introduction - ranger.uta.eduranger.uta.edu/~jrao/cse3320/spring2018/slides/lec1_intro.pdf · what...

18
Ref. MOS4E, OS@Austin, Columbia, UWisc CSE 3320 CSE 3320 Operating Systems Introduction Jia Rao Department of Computer Science and Engineering http://ranger.uta.edu/~jrao UT Arlington

Upload: vohuong

Post on 05-Apr-2018

222 views

Category:

Documents


2 download

TRANSCRIPT

Ref.MOS4E,OS@Austin,Columbia,UWiscCSE3320

CSE 3320OperatingSystems

Introduction

Jia RaoDepartmentofComputerScience and Engineering

http://ranger.uta.edu/~jrao

UT Arlington

Outline

• WhystudyOperatingSystems?

• Whattolearn?

• Coursestructure• Coursepolicy• OSoverview

WhyStudyOperatingSystems?

• Themostcomplexsoftwareo ~8millionlinesofcodeinLinux

• Themostfundamentalsoftwareo OSes arealmosteverywhere,e.g.,supercomputer,PC,phone…

• BystudyingOS,youwillo Learnhowcomputerswork

o GainagoodunderstandingofOSandhardware

o Learnaboutsystemdesign} Simplicity,portability,performance,andtrade-offs

WhattoLearn?

• Hardwareabstractiono processes,threads,files…

• Resourcemanagemento CPUscheduling,memorymanagement,filesystems…

• Coordinationo Multipleprogramsandusers

o Fairness andefficiency

• Casestudies:Linux

CourseStructure• Lectures

o TuesdayandThursday2:00PM– 3:20PMo NH112

• Homeworko 2 writtenassignments

• Projectso 4 programmingassignmentso 2studentsteamup

• Exams(closedbooks,onecheatsheet)o Midterm:inclass,Mar. 8.o Final:2:00PM– 4:30PM,May8.

CoursePolicy

• Gradingscale

Percentage Grade

90- 100 A

80- 89 B

70 - 79 C

60 - 69 D

Below60 E/F

GradingPolicy(cont.)

• Gradingpercentageo In-classdiscussion:5%

o Homeworkassignments:10%

o Projects:35%

o Midterm:18%

o Finalexam:32%

Wheretoseekhelp?

• Askquestionsinclass• Attendofficehours

o Dr.Jia Rao:T/Th 10:00AM– 11:00AM

o ERB649

WhatisanOperatingSystem?

• Acomputersystemconsistsofo hardwareo systemprogramso applicationprograms

WhatdoesanOperatingSystemdo?

• Itisanextended(orvirtual)machineo Hidesthemessydetailswhichmustbeperformed

o Presentsuserwithavirtualmachine,easiertouse

o Protectiondomain

• Itisaresourcemanagero Eachprogramgetstimewiththeresource,e.g.,CPU

o Eachprogramgetsspaceontheresource,e.g.,MEM

The Operating System as an Extended Machine

fprintf(fd, “%d”, data);

write(fd, buffer, count) ;

load(block, length, device);seek(device, track);out(device, sector);

file->f_op->write(file, buf, count, pos);

The Operating System as a Resource Manager

Program1 Programi Programn… …

ExtendedMachineInterface(ResourceAbstraction)

OSResourceSharing

Time-multiplexedCPUResource Space-multiplexedmemoryResource

ObjectivesofResourceAbstraction

• Resourceabstractiono Maskcomplexity

o Covermultipledevices

o Reliability

• Resourcesharingo Efficiency

o Fairness

o Protectionandsecurity

HowdoesanOSwork?

• Dualmodeoperationo Usermode(application)

o Kernelmode(OSkernel)

• Transitionbetweenuser/kernelmodeo interrupt– HWdevicerequestsOSservices

o Trap– userprogramrequestsOSservices

o Exception– errorhandling

DifferentTypesofOS• Batchprocessing

o Processesjobsonebyone

• TimesharingOSo Processesmultiplejobsin“roundrobin”

• Real-timeOSo Stilltime-sharing,buthasdeadlinesforcertainjobs

• DistributedOSo MultiplecomputersrunasinglecopyofOS

• EmbeddedOSo Runsoncellphones,PDAs,tailoredandhighlyefficient

TheStructureofOS

UNIX,Linux,Windows98 Mach

HybridKernel

WindowsNT,MacOS

Advantagev.s.disadvantage?

HistoryofOperatingSystems• Firstgeneration1945- 1955

o vacuumtubes,plugboards• Secondgeneration1955- 1965

o transistors,batchsystems• Thirdgeneration1965– 1980

o ICsandmultiprogramming• Fourthgeneration1980– present

o personalcomputers• Present– next5-10years

o Mobiledeviceso Many-corecomputers

Summary

• AnOSisjustaspecialprogramo Twofunctionalities:resourceabstractionandsharing

o Providesservicestouserprograms

• ThreewaystorequestOSserviceso Interrupt,trap,andexception

• Nextclasso Overviewofcomputerhardware

o Organizationofoperatingsystems