LEC7-调度.ppt
《LEC7-调度.ppt》由会员分享,可在线阅读,更多相关《LEC7-调度.ppt(47页珍藏版)》请在淘文阁 - 分享文档赚钱的网站上搜索。
1、Operating SystemLecture SevenUniprocessor SchedulingSchool of SoftwareNanjing University本主题教学目标本主题教学目标1.掌握调度的层次掌握调度的层次2.掌握低级调度及其策略掌握低级调度及其策略3.掌握掌握作业调度及其策略作业调度及其策略 Aim of SchedulingnResponse timenThroughputnProcessor efficiencyTypes of SchedulingLong-Term SchedulingnDetermines which programs are admi
2、tted to the system for processingnControls the degree of multiprogrammingnMore processes,smaller percentage of time each process is executedMedium-Term SchedulingnPart of the swapping functionnBased on the need to manage the degree of multiprogrammingShort-Term SchedulingnKnown as the dispatchernExe
3、cutes most frequentlynInvoked when an event occursnClock interruptsnI/O interruptsnOperating system callsnSignalsShort-Tem Scheduling CriterianUser-orientednResponse Time:Elapsed time between the submission of a request until there is output.nSystem-orientednEffective and efficient utilization of th
4、e processorShort-Term Scheduling CriterianPerformance-relatednQuantitativenMeasurable such as response time and throughputnNot performance relatednQualitativenPredictabilityPrioritiesnScheduler will always choose a process of higher priority over one of lower prioritynHave multiple ready queues to r
5、epresent each level of prioritynLower-priority may suffer starvationnallow a process to change its priority based on its age or execution historyDecision ModenNonpreemptivenOnce a process is in the running state,it will continue until it terminates or blocks itself for I/OnPreemptivenCurrently runni
6、ng process may be interrupted and moved to the Ready state by the operating systemnAllows for better service since any one process cannot monopolize the processor for very longProcess Scheduling ExampleFirst-Come-First-Served(FCFS)nEach process joins the Ready queuenWhen the current process ceases t
7、o execute,the oldest process in the Ready queue is selectedFirst-Come-First-Served(FCFS)0510152012345First-Come-First-Served(FCFS)nA short process may have to wait a very long time before it can executenFavors CPU-bound processesnI/O processes have to wait until CPU-bound process completesRound-Robi
8、nnUses preemption based on a clocknAn amount of time is determined that allows each process to use the processor for that length of timeRound-Robin0510152012345Round-RobinnClock interrupt is generated at periodic intervalsnWhen an interrupt occurs,the currently running process is placed in the read
9、queuenNext ready job is selectednKnown as time slicingShortest Process NextnNonpreemptive policynProcess with shortest expected processing time is selected nextnShort process jumps ahead of longer processesShortest Process Next0510152012345Shortest Process NextnPredictability of longer processes is
10、reducednIf estimated time for process not correct,the operating system may abort itnPossibility of starvation for longer processesShortest Remaining TimenPreemptive version of shortest process next policynMust estimate processing timeShortest Remaining Time0510152012345Highest Response Ratio Next(HR
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- LEC7 调度
限制150内