操作系統(tǒng) 單處理器調(diào)度._第1頁
操作系統(tǒng) 單處理器調(diào)度._第2頁
操作系統(tǒng) 單處理器調(diào)度._第3頁
操作系統(tǒng) 單處理器調(diào)度._第4頁
操作系統(tǒng) 單處理器調(diào)度._第5頁
已閱讀5頁,還剩28頁未讀, 繼續(xù)免費閱讀

下載本文檔

版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進行舉報或認領(lǐng)

文檔簡介

1、1Uniprocessor SchedulingChapter 92Aim of SchedulingnAssign processes to be executed by the processor(s)nScheduling Criteria(準則)Response time(響應(yīng)時間)Throughput (吞吐量)Processor efficiency3Types of Scheduling4Scheduling and Process State Transitions5Levels of Scheduling6Long-Term SchedulingnDetermines whi

2、ch programs are admitted to the system for processingnControls the degree of multiprogrammingnMore processes, smaller percentage of time each process is executed7Medium-Term SchedulingnPart of the swapping functionnBased on the need to manage the degree of multiprogramming8Short-Term SchedulingnKnow

3、n as the dispatchernExecutes most frequentlynInvoked when an event occursClock interruptsI/O interruptsOperating system callsSignals9Short-Tem Scheduling CriterianUser-orientedResponse TimenElapsed time between the submission of a request until there is output.nSystem-orientedEffective and efficient

4、 utilization of the processornPerformance-relatedQuantitativeMeasurable such as response time and throughput10Scheduling Criteria11Scheduling Criteria (Cont.)12Queues for Scheduling13PrioritiesnScheduler will always choose a process of higher priority over one of lower prioritynHave multiple ready q

5、ueues to represent each level of prioritynLower-priority may suffer starvation(饑餓)Allow a process to change its priority based on its age or execution history14Priority Queuing15Decision ModenNonpreemptiveOnce a process is in the running state, it will continue until it terminates or blocks itself f

6、or I/OnPreemptiveCurrently running process may be interrupted and moved to the Ready state by the operating systemAllows for better service since any one process cannot monopolize the processor for very long16Process Scheduling Example17First-Come-First-Served (FCFS)nEach process joins the Ready que

7、uenWhen the current process ceases to execute, the oldest process in the Ready queue is selected18First-Come-First-Served (Cont.)nA short process may have to wait a very long time before it can executenFavors CPU-bound processesI/O processes have to wait until CPU-bound process completes19Round-Robi

8、n (RR)nUses preemption based on a clocknAn amount of time is determined that allows each process to use the processor for that length of time20Round-Robin (Cont.)nClock interrupt is generated at periodic intervalsnWhen an interrupt occurs, the currently running process is placed in the read queueNex

9、t ready job is selectednKnown as time slicing21Preemption Time Quantum22Virtual Round-Robin SchedulernDrawback of RRCPU-boundI/O-boundUnfairness23Shortest Process NextnNonpreemptive policynProcess with shortest expected processing time is selected nextnShort process jumps ahead of longer processes24

10、Shortest Process Next (Cont.)nPredictability of longer processes is reducednIf estimated time for process not correct, the operating system may abort itnPossibility of starvation for longer processes25Shortest Remaining TimenPreemptive version of shortest process next policynMust estimate processing

11、 time26Highest Response Ratio Next (HRRN)nChoose next process with the greatest ratiotime spent waiting + expected service timeexpected service time27FeedbacknPenalize jobs that have been running longernDont know remaining time process needs to execute28Feedback (Cont.)29Characteristics of Various P

12、olicies30Comparison of Scheduling Policies31Traditional UNIX SchedulingnMultilevel feedback using round robin within each of the priority queuesnIf a running process does not block or complete within 1 second, it is preemptednPriorities are recomputed once per secondnBase priority divides all processes i

溫馨提示

  • 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負責。
  • 6. 下載文件中如有侵權(quán)或不適當內(nèi)容,請與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。

評論

0/150

提交評論