View
221
Download
2
Category
Preview:
Citation preview
Ref.MOS4E,OS@Austin,Columbia,UWiscCSE3320
CSE 3320OperatingSystems
Introduction
Jia RaoDepartmentofComputerScience and Engineering
http://ranger.uta.edu/~jrao
UT Arlington
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.
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
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
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
Recommended