中科大操作系统课件01.ppt
《中科大操作系统课件01.ppt》由会员分享,可在线阅读,更多相关《中科大操作系统课件01.ppt(70页珍藏版)》请在淘文阁 - 分享文档赚钱的网站上搜索。
1、MODERN OPERATING SYSTEMSThird EditionANDREW S.TANENBAUMChapter 1IntroductionTanenbaum,Modern Operating Systems 3 e,(c)2008 Prentice-Hall,Inc.All rights reserved.0-13-6006639OutlinenWhat is an operating systemnThe history of Operating SystemnHardware of operating systemnImportant concepts of Operatin
2、g SystemWhat Is An Operating SystemA modern computer consists of:One or more processorsMain memoryDisksPrintersVarious input/output devicesManaging all these components requires a layer of software the operating systemTanenbaum,Modern Operating Systems 3 e,(c)2008 Prentice-Hall,Inc.All rights reserv
3、ed.0-13-6006639What is an Operating System?nA modern computer is very complex.qNetworkingqDisksqVideo/audio cardq.nIt is impossible for every application programmer to understand every detailnA layer of computer software is introduced to provide a better,simpler,cleaner model of the resources and ma
4、nage themWhat Is An Operating SystemFigure 1-1.Where the operating system fits in.Tanenbaum,Modern Operating Systems 3 e,(c)2008 Prentice-Hall,Inc.All rights reserved.0-13-6006639What is an Operating System?nUsers use various OSqWindows,Linux,Mac OS etc.nUser interacts with shell or GUIqpart of OS?q
5、they use OS to get their work donenIs device driver part of OS?What is an Operating System?nOn top of hardware is OSnMost computers have two modes of operation:qKernel mode and user modeqOS runs in kernel mode,which has complete access to all hardware and can execute any instructionqRest of software
6、 runs in user mode,which has limited capabilityqShell or GUI is the lowest level of user mode softwareWhat is an operating system?nTwo functions:qFrom top to down:provide application programmers a clean abstract set of resources instead of hardware ones qFrom down to top:Manage these hardware resour
7、cesThe Operating System as an Extended MachineFigure 1-2.Operating systems turn ugly hardware into beautiful abstractions.Tanenbaum,Modern Operating Systems 3 e,(c)2008 Prentice-Hall,Inc.All rights reserved.0-13-6006639As an extended machinenAbstraction:qCPUprocessqStorage-filesqMemory address space
8、n4 types of people:qIndustrial engineer:design hardwareqKernel designerqApplication programmer:OSs userqEnd usersThe Operating System as a Resource ManagerAllow multiple programs to run at the same timeManage and protect memory,I/O devices,and other resourcesIncludes multiplexing(sharing)resources i
9、n two different ways:In timeIn spaceTanenbaum,Modern Operating Systems 3 e,(c)2008 Prentice-Hall,Inc.All rights reserved.0-13-6006639As a resource managernModern OS runs multiple programs of multiple users at the same timeqImagine what would happen if several programs want to print at the same time?
10、qHow to account the resource usage of each process?qResources can be multiplexed:nHow to ensure fairness and efficiency?summarynOperating system is a softwareqIs a complex softwareqRuns in kernel modeqManages hardwareqProvide a friendly interface for application programmerHistory of Operating System
11、sGenerations:(194555)Vacuum Tubes(195565)Transistors and Batch Systems(19651980)ICs and Multiprogramming(1980Present)Personal ComputersTanenbaum,Modern Operating Systems 3 e,(c)2008 Prentice-Hall,Inc.All rights reserved.0-13-60066391st:vacuum tubesnLarge and slownEngineers design,build,operate and m
12、aintain the computernAll programming is done with machine language,or by wiring circuits using cablesninsert plugboards into the computer and operatenThe work is mainly numerical calculations2nd:transistors and batch systemsnAlso called mainframesnComputers are managed by professional operatorsnProg
13、rammers use punch card to run programs;operators operate(load compiler,etc)and collect output to the usernComplains soon come:qHuman Operation between computer operationqLead to batch systemqCollect a batch of jobs in the input room,then read them into a magnetic tape;the same for output2nd:Transist
14、ors and Batch Systems(1)Figure 1-3.An early batch system.(a)Programmers bring cards to 1401.(b)1401 reads batch of jobs onto tape.Tanenbaum,Modern Operating Systems 3 e,(c)2008 Prentice-Hall,Inc.All rights reserved.0-13-6006639Transistors and Batch Systems(2)Figure 1-3.(c)Operator carries input tape
15、 to 7094.(d)7094 does computing.(e)Operator carries output tape to 1401.(f)1401 prints output.Tanenbaum,Modern Operating Systems 3 e,(c)2008 Prentice-Hall,Inc.All rights reserved.0-13-6006639Transistors and Batch Systems(4)Figure 1-4.Structure of a typical FMS job.Tanenbaum,Modern Operating Systems
16、3 e,(c)2008 Prentice-Hall,Inc.All rights reserved.0-13-60066393rd:IC and MultiprogrammingnOS/360:a dinosaur stuck in a tar pitqAims to adapts 1401/7904,covers all trades of lifeqHowever,OS/360 introduces several key techniquesnMulti-programming:solve the problem of CPU idlingnSpooling:simultaneous p
17、eripheral operation on lineqWhenever a job finishes,OS load a new job from disk to the empty-partitionFigure 1-5.A multiprogramming system with three jobs in memory.3rd:ICs and MultiprogrammingTanenbaum,Modern Operating Systems 3 e,(c)2008 Prentice-Hall,Inc.All rights reserved.0-13-60066393rd:Ics an
18、d MultiprogrammingnProblems:q3rd generation OS was well suited for big scientific calculations and massive data processingqBut many programmers complain a lot for not be able to debug quickly.Why?qAnd the solution to this problem would be.?qTimesharing:nA variant of multiprogrammingnProvide both fas
19、t interactive service but also fits big batch work3rd:IC and MultiprogrammingnA system to be remembered:MULTICSqA machine that would support hundreds of simultaneous timesharing users like the electricity system(like a web server nowadays)qIntroduces many brilliant ideas but enjoys no commercial suc
20、cessqIts step-child is the well-known and time-honored UNIXqSystem V/FreeBSD,MINIX,Linux4th:personal computersnComputers have performance similar to 3rd generation,but prices drastically differentnCP/MqFirst disk-based OSn1980,IBM PC,Basic Interpreter,DOS,MS-DOSnGUI-LisaApple:user friendlynMS-DOS wi
21、th GUI Win95/98/mewinNT/xpSummaryn4 generations OSnDevelops with hardware and user needsnMulti-user,multi-programming,time-sharingComputer Hardware ReviewFigure 1-6.Some of the components of a simple personal computer.Tanenbaum,Modern Operating Systems 3 e,(c)2008 Prentice-Hall,Inc.All rights reserv
22、ed.0-13-6006639Hardware:processornBrain of computerqFetches instruction from memory and executeqCycle of CPU:nfetch,decode,executeqCPU has registers to store variable and temporary result:load from memory to register;store from register to memoryqProgram counter:next instruction to fetchqStack point
23、er:the top of the current stackqPSW:program status word,priority,modeA referencenAdam Smith:Wealth of NationnOf the Division of labornOne man draws out the wire,another straights it,a third cuts it,a fourth points it,a fifth grinds it at the topnOne person could make up to forth-eight thousand pins
24、in a dayCPU PipeliningFigure 1-7.(a)A three-stage pipeline.(b)A superscalar CPU.Tanenbaum,Modern Operating Systems 3 e,(c)2008 Prentice-Hall,Inc.All rights reserved.0-13-6006639CPU PipelinenAccelerate the executionnCause headaches to OS/compiler writersnFor superscalar:instructions are often execute
25、d out of order Figure 1-8.(a)A quad-core chip with a shared L2 cache.(b)A quad-core chip with separate L2 caches.Multithreaded and Multicore ChipsTanenbaum,Modern Operating Systems 3 e,(c)2008 Prentice-Hall,Inc.All rights reserved.0-13-6006639Figure 1-9.A typical memory hierarchy.The numbers are ver
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 中科大 操作系统 课件 01
限制150内