计算机操作系统--Operating-System-Overview.ppt

上传人:可**** 文档编号:77553962 上传时间:2023-03-15 格式:PPT 页数:52 大小:996KB
返回 下载 相关 举报
计算机操作系统--Operating-System-Overview.ppt_第1页
第1页 / 共52页
计算机操作系统--Operating-System-Overview.ppt_第2页
第2页 / 共52页
点击查看更多>>
资源描述

《计算机操作系统--Operating-System-Overview.ppt》由会员分享,可在线阅读,更多相关《计算机操作系统--Operating-System-Overview.ppt(52页珍藏版)》请在taowenge.com淘文阁网|工程机械CAD图纸|机械工程制图|CAD装配图下载|SolidWorks_CaTia_CAD_UG_PROE_设计图分享下载上搜索。

1、Chapter 1 Operating System OverviewOPERATING SYSTEM OVERVIEWContentsContentsvOperating System Objectives and FunctionsOperating System Objectives and FunctionsvThe Evolution of Operating SystemThe Evolution of Operating SystemvMajor AchievementsMajor AchievementsvCharacteristics of Modern OSCharacte

2、ristics of Modern OSvExamplesExamples(NTNT、UNIXUNIX)OPERATING SYSTEM OVERVIEW1.1 Objectives and Functions(p45)1.1 Objectives and Functions(p45)1.1.1 Overview1.1.1 Overview1.1.2 The Operating System as a User/Computer Interface1.1.2 The Operating System as a User/Computer Interface1.1.3 The Operating

3、 System as Resource Manager1.1.3 The Operating System as Resource Manager1.1.4 Ease of Evolution of an Operating System1.1.4 Ease of Evolution of an Operating SystemOPERATING SYSTEM OVERVIEWvAn operating system is a An operating system is a programprogram that manages the that manages the computer,c

4、ontrols the execution of application computer,controls the execution of application programs and acts as an programs and acts as an interfaceinterface(接口接口接口接口)between)between the user of a computer and the computer hardware.the user of a computer and the computer hardware.vObjectivesObjectivesConve

5、nienceConvenience(方便)(方便)(方便)(方便)EfficiencyEfficiency(有效)(有效)(有效)(有效)Ability to evolveAbility to evolve(易扩展)(易扩展)(易扩展)(易扩展)1.1.1 Overview1.1.1 OverviewOPERATING SYSTEM OVERVIEW1.1.2 OS as a User/Computer Interface(I)1.1.2 OS as a User/Computer Interface(I)Figure 2.1 Layers and Views of a Computer Sy

6、stemComputer HardwareOperating SystemUtilities(Compiler,Database)Applications ProgramsOperatingSystem DesignerProgrammersEnd UserOPERATING SYSTEM OVERVIEWvThe operating system The operating system masksmasks(隐藏)(隐藏)(隐藏)(隐藏)the details of the details of the hardware from the programmerthe hardware fr

7、om the programmer,and provides and provides the programmer with a convenient interface for the programmer with a convenient interface for using the system.using the system.vThe types of system interfaceThe types of system interfaceCommand interface:system command(internalCommand interface:system com

8、mand(internal、external)external)Graphics interface:windowsGraphics interface:windowsProgrammer interface:system call,c-libProgrammer interface:system call,c-libOS as a User/Computer Interface(II)OS as a User/Computer Interface(II)OPERATING SYSTEM OVERVIEWServices of the Operating System(I)Services o

9、f the Operating System(I)vProgram creationProgram creationSuch as:fork(Such as:fork(unixunix)、CreateProcessCreateProcess (win)(win)vProgram executionProgram executionSuch as:Such as:execlexecl,execpexecpvAccess to I/O devicesAccess to I/O devicesSuch as:read/writeSuch as:read/writevControlled access

10、 to filesControlled access to filesSuch as:read/writeSuch as:read/writeOPERATING SYSTEM OVERVIEWServices of the Operating System(II)Services of the Operating System(II)vSystem accessSystem accessProvide protection and authorizedProvide protection and authorizedvError detection and responseError dete

11、ction and responseSuch as:errorSuch as:errorvAccountingAccountingOPERATING SYSTEM OVERVIEW1.1.3 OS as Resource Manager(I)1.1.3 OS as Resource Manager(I)(p47p47)vTypes of Resource:CPUTypes of Resource:CPU、MemoryMemory、DevicesDevicesvCPU:chapter 3.4.5.6.9.10CPU:chapter 3.4.5.6.9.10vMemory:chapter 7.8M

12、emory:chapter 7.8vI/O Devices:chapter 11.12I/O Devices:chapter 11.12OPERATING SYSTEM OVERVIEWOS as Resource Manager(II)OS as Resource Manager(II)vAs a control mechanism is unusual in two respectsAs a control mechanism is unusual in two respectsThe OS functions in the same way as ordinary The OS func

13、tions in the same way as ordinary computer software;that is,it is a program computer software;that is,it is a program executed by the processor.executed by the processor.The OS frequently The OS frequently relinquishes controlrelinquishes control(释放控释放控释放控释放控制制制制)and must depend on the processor to

14、allow it)and must depend on the processor to allow it to to regain controlregain control(获取控制)(获取控制)(获取控制)(获取控制).OPERATING SYSTEM OVERVIEWOS as Resource Manager(III Figure 2.2)OS as Resource Manager(III Figure 2.2)vManagement of CPUManagement of CPUvManagement of I/O DeviceManagement of I/O DevicevM

15、anagement of MemoryManagement of MemoryvManagement of FilesManagement of FilesvConcept:Concept:KernelKernel、NucleusNucleus(内核内核内核内核):Always in main):Always in main memory,contains the most-frequently-used memory,contains the most-frequently-used functionsfunctionsOPERATING SYSTEM OVERVIEW1.1.4 Ease

16、of Evolution1.1.4 Ease of Evolution(p49p49)vReasons for evolutionReasons for evolutionhardware upgradeshardware upgradesExp:support pagingExp:support pagingnew servicesnew servicesfixesfixesvImplementsImplementssoftware engineering:modulessoftware engineering:modules、layerlayer、object designobject d

17、esignOPERATING SYSTEM OVERVIEW1.2 The Evolution of Operating Systems1.2 The Evolution of Operating Systems1.2.1 Serial Processing1.2.1 Serial Processing1.2.2 Simple 1.2.2 Simple BatchBatch Systems Systems1.2.3 1.2.3 MultiprogrammedMultiprogrammed(多道)(多道)(多道)(多道)Batch SystemsBatch Systems1.2.4 1.2.4

18、Time-SharingTime-Sharing Systems SystemsOPERATING SYSTEM OVERVIEW1.2.1 Serial Processing(p501.2.1 Serial Processing(p50串行处理串行处理串行处理串行处理)vExampleExampleInput Input Calculate Calculate Print PrintvProblemsProblemsSchedulingScheduling:The estimated time is not accurate:The estimated time is not accurat

19、eSetup timeSetup time:Between the setup procedure,if an:Between the setup procedure,if an error occurred,then must go back to the error occurred,then must go back to the beginning of the setup sequencebeginning of the setup sequenceContradiction between human and machineContradiction between human a

20、nd machineOPERATING SYSTEM OVERVIEW1.2.2 Simple Batch System1.2.2 Simple Batch SystemvObjectivesObjectives:Solution contradiction between human Solution contradiction between human and machineand machineUser submits the job on cards or tape to a User submits the job on cards or tape to a computer op

21、erator(use JCLcomputer operator(use JCL(job control job control language)language)vImplement:MonitorImplement:MonitorOPERATING SYSTEM OVERVIEWFrom the Point of View of the Monitor(p51)From the Point of View of the Monitor(p51)vvMonitorMonitor is responsible for the is responsible for the running of

22、every jobrunning of every jobvvControls are transferred between Controls are transferred between monitor and other user programsmonitor and other user programsInterrupt processingDevice DriversJob SequencingControl Language InterpreterUser Program AreamonitorMemory layout for a resident(驻留)monitorOP

23、ERATING SYSTEM OVERVIEWFrom the Point of View of the ProcessorvWhen CPU runs command of monitor,the monitor When CPU runs command of monitor,the monitor gains the control.gains the control.vWhen CPU runs command of user program,the When CPU runs command of user program,the user program gains the con

24、trol.user program gains the control.vTransfer the control:Transfer the control:First monitor gains the First monitor gains the control,when user program load in,it gains the control,when user program load in,it gains the control,when the user program finish or error,the control,when the user program

25、 finish or error,the monitor regainsmonitor regains(重获)(重获)(重获)(重获)the control.the control.OPERATING SYSTEM OVERVIEWJCL(Job Control Language)JCL(Job Control Language)$JOB /begin$JOB /begin$FTN /using Fortran compile and link$FTN /using Fortran compile and linkFortran /instructionsFortran /instructio

26、ns$LOAD /load in$LOAD /load in runablerunable modules modules$RUN /running.$RUN /running.$END /finish do the job$END /finish do the jobOPERATING SYSTEM OVERVIEWOther Hardware Feature Desirable(p53)Other Hardware Feature Desirable(p53)vvMemory protectionMemory protection(内存保护)(内存保护)(内存保护)(内存保护):User

27、space and system User space and system space are independent.space are independent.E.g.Hardware can detect outside accessing error.E.g.Hardware can detect outside accessing error.vvTimer interruptTimer interrupt(时钟中断)时钟中断)时钟中断)时钟中断):When the timer expires,an When the timer expires,an interrupt occur

28、s.interrupt occurs.vvPrivileged instructionsPrivileged instructions(特权指令)(特权指令)(特权指令)(特权指令):Can be executed only Can be executed only by the monitor.by the monitor.vvInterrupts:Interrupts:Improvement efficiencyImprovement efficiency Easy for relinquishingEasy for relinquishing(释放)(释放)(释放)(释放)and reg

29、aining controland regaining controlOPERATING SYSTEM OVERVIEW1.2.3 1.2.3 MultiprogrammedMultiprogrammed Batch Systems Batch SystemsRead one record0.0015 secondsExecute 100 instructions0.0001 secondsWrite one record0.0015 secondsTOTAL0.0031 secondsPercent CPU Utilization=0.0001/0.0031=3.2%Figure 2.4 S

30、ystem Utilization ExamplevvUniprogrammingUniprogramming(单道)(单道)(单道)(单道)has low efficiencyhas low efficiency(效率)(效率)(效率)(效率):CPU-I/O contradictionCPU-I/O contradictionOPERATING SYSTEM OVERVIEWMultiprogramming/MultitaskingMultiprogramming/MultitaskingvThere are many user programs in the There are many

31、 user programs in the memory.memory.vHardware need for Multiprogramming.Hardware need for Multiprogramming.InterruptionInterruptionvFor example:p55 Fig2.5For example:p55 Fig2.5OPERATING SYSTEM OVERVIEWExample of MultiprogrammingExample of Multiprogrammingv256k available memoryvvNotes:not consider th

32、e resource competitionNotes:not consider the resource competitionJOB1JOB2JOB3Type of JOBHeavy ComputerHeavy I/OHeavy I/ODuration5min15min10minMemory required50k100k80kNeed diskNoNoYesNeed terminalNoYesNoNeed printerNoNoYesTable 2.1 Sample Program Execution Attributes OPERATING SYSTEM OVERVIEWAnalysi

33、sAnalysisOPERATING SYSTEM OVERVIEWAnalysisAnalysisvSingleProcessor use5/(5+15+10)=17%Memory use=(50*5+100*15+80*10)/256/30=33%Disk use=10/30=33%Printer use10/30=33%Total time 5+15+1030Throughput 6 job/hourMean response time(5+20+30)/3=18OPERATING SYSTEM OVERVIEWAnalysisAnalysisvvMultiprogrammingMult

34、iprogrammingProcessor use5/15=33%Memory use=(50+100+80)*5+(100+80)*5+100*5/256/15=65%Disk use=10/15=67%Printer use10/15=67%Total time15Throughout 12job/hourMean response time(5+10+15)/3=10OPERATING SYSTEM OVERVIEWSophisticated(Sophisticated(复杂性复杂性复杂性复杂性)of Multiprogramming(p57)of Multiprogramming(p5

35、7)vMemory managementMemory managementvScheduling Scheduling AlgorithmAlgorithm(算法)(算法)(算法)(算法):The processor:The processor(处理器)(处理器)(处理器)(处理器)must decide which one to run.must decide which one to run.OPERATING SYSTEM OVERVIEW1.2.4 T1.2.4 Time-Sharing Systemsime-Sharing SystemsvvMultiple users simult

36、aneouslyMultiple users simultaneously(同时)(同时)(同时)(同时)access the system access the system through terminals(through terminals(终端终端终端终端)vvConcepts:Concepts:time slicetime slice(时间片)(时间片)(时间片)(时间片):q:q user numuser num(用户数)(用户数)(用户数)(用户数):n:n response timeresponse time(响应时间)(响应时间)(响应时间)(响应时间):t:t t=t=n

37、qnqvvMode:multi-terminalsMode:multi-terminals、multi-windowsmulti-windowsOPERATING SYSTEM OVERVIEWBatch Multiprogramming Batch Multiprogramming vsvs Timer Sharing Timer SharingBatch Multiprogramming Time Sharing Principal Principal objectiveobjective Maximize Maximize processor useprocessor use Minim

38、ize Minimize response timeresponse time Source of Source of instruction to instruction to operating systemoperating system Job control Job control language language commands commands provided with the provided with the jobjob Commands Commands entered at the entered at the terminalterminal OPERATING

39、 SYSTEM OVERVIEWReducing the Swapping Loads by Partial SwappingReducing the Swapping Loads by Partial Swapping(p59p59)Reducing the spending for accessing disk OPERATING SYSTEM OVERVIEW1.3 Major Achievements1.3 Major Achievements(p60p60)1.3.1 Processes(1.3.1 Processes(进程进程进程进程)1.3.2 Memory management

40、1.3.2 Memory management1.3.3 Information protection and security1.3.3 Information protection and security1.3.4 Scheduling and resource management1.3.4 Scheduling and resource management1.3.5 System structure1.3.5 System structureOPERATING SYSTEM OVERVIEW1.3.1 Processes1.3.1 ProcessesvvA program in e

41、xecutionA program in executionvvThe animated spiritThe animated spirit(活动精灵)(活动精灵)(活动精灵)(活动精灵)of a programof a programvvThe entityThe entity(实体)(实体)(实体)(实体)that can be assignedthat can be assigned(分派)(分派)(分派)(分派)to and to and executed on a processorexecuted on a processorvvThree major types of compu

42、ter systemThree major types of computer system Multiprogramming batch operationMultiprogramming batch operation Time sharingTime sharing Real-time transactionReal-time transaction(处理)(处理)(处理)(处理)systemssystemsOPERATING SYSTEM OVERVIEWErrors May Happen in MultiprogrammingErrors May Happen in Multipro

43、grammingvImproper synchronizationImproper synchronization(同步)(同步)(同步)(同步):Signals being:Signals being lost or duplicatelost or duplicate(重复)(重复)(重复)(重复)signals being received.signals being received.vFailed mutual exclusionFailed mutual exclusion(失败的互斥失败的互斥失败的互斥失败的互斥)vNondeterminateNondeterminate(不确定

44、)(不确定)(不确定)(不确定)program operationprogram operation:The result is not uniqueThe result is not uniquevDeadlocksDeadlocks(死锁)(死锁)(死锁)(死锁)vTo solute these problems,introduce process conceptTo solute these problems,introduce process conceptOPERATING SYSTEM OVERVIEW Process entity(Process entity(实体实体实体实体)

45、vAn executable programAn executable programvThe associated data needed by the programThe associated data needed by the programvThe execution context(The execution context(上下文上下文上下文上下文)of the program)of the programOPERATING SYSTEM OVERVIEWProcess Image and Process SwitchProcess Image and Process Swit

46、ch(切换)(切换)(切换)(切换)(p63)(p63)OPERATING SYSTEM OVERVIEW1.3.2 Memory Management1.3.2 Memory ManagementvProcess isolationProcess isolation(隔离)(隔离)(隔离)(隔离)vAutomatic allocation and managementAutomatic allocation and managementvSupport of modularSupport of modular(模块化)(模块化)(模块化)(模块化)programmingprogramming

47、vVirtually memoryVirtually memoryvLong-term storageLong-term storagevProtection and access controlProtection and access control(访问控制)访问控制)访问控制)访问控制)OPERATING SYSTEM OVERVIEWFig 2.10 Two Views of a Storage SystemVirtual ProcessorReal ProcessorMapper(AddressTranslate)Main MemoryAuxiliaryMemoryVirtualM

48、emoryFiles(a)Users View(b)Operating System Designers ViewVirtualAddressMemoryAddressSwappingRead,WriteCopyLong-term StoreOPERATING SYSTEM OVERVIEW1.3.3 Information Protection and Security1.3.3 Information Protection and SecurityvAccess controlAccess control:for various resources in the system:for va

49、rious resources in the systemvInformation flow controlInformation flow control(信息流控)(信息流控)(信息流控)(信息流控):to:to guarantee the data to send to destinationguarantee the data to send to destinationvCertificationCertification(认证)(认证)(认证)(认证)OPERATING SYSTEM OVERVIEW1.3.4 Scheduling and Resource Management1

50、.3.4 Scheduling and Resource Management(p66p66)vvThree factors must be considerThree factors must be consider FairnessFairness Differential responsivenessDifferential responsiveness(区分服务区分服务区分服务区分服务):):e.g.e.g.If a process is If a process is waiting for the use of an I/O device,the operating system

展开阅读全文
相关资源
相关搜索

当前位置:首页 > 应用文书 > 工作计划

本站为文档C TO C交易模式,本站只提供存储空间、用户上传的文档直接被用户下载,本站只是中间服务平台,本站所有文档下载所得的收益归上传人(含作者)所有。本站仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。若文档所含内容侵犯了您的版权或隐私,请立即通知淘文阁网,我们立即给予删除!客服QQ:136780468 微信:18945177775 电话:18904686070

工信部备案号:黑ICP备15003705号© 2020-2023 www.taowenge.com 淘文阁