5 cpu scheduling 1
play

5 CPU Scheduling (1) - PowerPoint PPT Presentation

. . . . . . . . . Scheduling Algorithms Scheduling Criteria Basic Concepts . . . . 5 CPU Scheduling (1) 2009 09 01


  1. . . . . . . . . . Scheduling Algorithms Scheduling Criteria Basic Concepts . . . . 小结和作业 操作系统原理与设计 第 5 章 CPU Scheduling (1) 陈香兰 中国科学技术大学计算机学院 2009 年 09 月 01 日 陈香兰 操作系统原理与设计

  2. . . CPU scheduling is the basis of multiprogrammed OSes. . . . . . . . Scheduling Algorithms Scheduling Criteria Basic Concepts . . . . 小结和作业 陈香兰 操作系统原理与设计

  3. . FCFS Scheduling 2 Scheduling Criteria Scheduling Criteria . .. 3 Scheduling Algorithms SJF Scheduling . Priority Scheduling Round Robin Scheduling Multilevel Queue Scheduling Multilevel Feedback Queue Scheduling . .. 4 .. . Dispatcher . CPU Scheduler CPU-I/O Burst Cycle Basic Concepts 1 .. . . . Preemptive Scheduling Scheduling Algorithms Scheduling Criteria Basic Concepts . . 小结和作业 . 提纲—— CPU scheduling (1) 小结和作业 陈香兰 操作系统原理与设计

  4. . . Maximum CPU utilization . . . . . . . . Objective of multiprogramming Dispatcher . Preemptive Scheduling CPU Scheduler CPU-I/O Burst Cycle Scheduling Algorithms Scheduling Criteria Basic Concepts . . . . 小结和作业 陈香兰 操作系统原理与设计

  5. . 3 Dispatcher . .. 2 Scheduling Criteria Scheduling Criteria . .. Scheduling Algorithms . FCFS Scheduling SJF Scheduling Priority Scheduling Round Robin Scheduling Multilevel Queue Scheduling Multilevel Feedback Queue Scheduling . .. 4 Preemptive Scheduling CPU Scheduler CPU-I/O Burst Cycle CPU Scheduler . . . . Basic Concepts Scheduling Criteria Scheduling Algorithms Basic Concepts CPU-I/O Burst Cycle Preemptive Scheduling Dispatcher . . . . .. 1 小结和作业 . Outline 小结和作业 陈香兰 操作系统原理与设计

  6. . . Bursts Alternating Sequence of CPU And I/O = n (CPU execution + I/O wait) Process execution of CPU execution and I/O wait Process execution consists of a cycle CPU-I/O Burst Cycle A property of process : . Dispatcher Preemptive Scheduling CPU Scheduler CPU-I/O Burst Cycle Scheduling Algorithms Scheduling Criteria Basic Concepts . . . . 小结和作业 . CPU-I/O Burst Cycle I 陈香兰 操作系统原理与设计

  7. . . Histogram of CPU-burst Times CPU burst distribution . Dispatcher Preemptive Scheduling CPU Scheduler CPU-I/O Burst Cycle Scheduling Algorithms Scheduling Criteria Basic Concepts . . . . 小结和作业 . CPU-I/O Burst Cycle II 陈香兰 操作系统原理与设计

  8. . . . . . . Basic Concepts Scheduling Criteria Scheduling Algorithms . CPU-I/O Burst Cycle CPU Scheduler Preemptive Scheduling Dispatcher 小结和作业 . CPU-I/O Burst Cycle III 陈香兰 操作系统原理与设计

  9. . 3 Dispatcher . .. 2 Scheduling Criteria Scheduling Criteria . .. Scheduling Algorithms . FCFS Scheduling SJF Scheduling Priority Scheduling Round Robin Scheduling Multilevel Queue Scheduling Multilevel Feedback Queue Scheduling . .. 4 Preemptive Scheduling CPU Scheduler CPU-I/O Burst Cycle CPU Scheduler . . . . Basic Concepts Scheduling Criteria Scheduling Algorithms Basic Concepts CPU-I/O Burst Cycle Preemptive Scheduling Dispatcher . . . . .. 1 小结和作业 . Outline 小结和作业 陈香兰 操作系统原理与设计

  10. . . unordered linked list? tree? by priority? FIFO Queue? Ready Queue: execute, and allocates the CPU to one of them Selects from among the processes in memory that are ready to CPU scheduler (Short-term Scheduler) . Dispatcher Preemptive Scheduling CPU Scheduler CPU-I/O Burst Cycle Scheduling Algorithms Scheduling Criteria Basic Concepts . . . . 小结和作业 . CPU Scheduler 陈香兰 操作系统原理与设计

  11. . 3 Dispatcher . .. 2 Scheduling Criteria Scheduling Criteria . .. Scheduling Algorithms . FCFS Scheduling SJF Scheduling Priority Scheduling Round Robin Scheduling Multilevel Queue Scheduling Multilevel Feedback Queue Scheduling . .. 4 Preemptive Scheduling CPU Scheduler CPU-I/O Burst Cycle CPU Scheduler . . . . Basic Concepts Scheduling Criteria Scheduling Algorithms Basic Concepts CPU-I/O Burst Cycle Preemptive Scheduling Dispatcher . . . . .. 1 小结和作业 . Outline 小结和作业 陈香兰 操作系统原理与设计

  12. . . 2 Switches from running to ready state . . . 3 Switches from waiting to ready . . . 4 Terminates The scheduling scheme: nonpreemptive: only 1 & 4 Windows 3.x before Mac OS X otherwise preemptive (usually needs a hardware timer, synchronization overhead) Windows 95 & ... . . . Switches from running to waiting state . . . . Basic Concepts Scheduling Criteria Scheduling Algorithms CPU-I/O Burst Cycle CPU Scheduler Preemptive Scheduling Dispatcher . CPU scheduling decisions may take place when a process: . . . 1 小结和作业 . Preemptive Scheduling I 陈香兰 操作系统原理与设计

  13. . . Interrupt affected code VS normal kernel code? preemptive kernel VS. nonpreemptive kernel? . . . . . . . Mac OS X . Dispatcher Preemptive Scheduling CPU Scheduler CPU-I/O Burst Cycle Scheduling Algorithms Scheduling Criteria Basic Concepts . . . . 小结和作业 . Preemptive Scheduling II 陈香兰 操作系统原理与设计

  14. . 3 Dispatcher . .. 2 Scheduling Criteria Scheduling Criteria . .. Scheduling Algorithms . FCFS Scheduling SJF Scheduling Priority Scheduling Round Robin Scheduling Multilevel Queue Scheduling Multilevel Feedback Queue Scheduling . .. 4 Preemptive Scheduling CPU Scheduler CPU-I/O Burst Cycle CPU Scheduler . . . . Basic Concepts Scheduling Criteria Scheduling Algorithms Basic Concepts CPU-I/O Burst Cycle Preemptive Scheduling Dispatcher . . . . .. 1 小结和作业 . Outline 小结和作业 陈香兰 操作系统原理与设计

  15. . . must be short one process and start another running Dispatch latency – time it takes for the dispatcher to stop that program jumping to the proper location in the user program to restart switching to user mode switching context selected by the short-term scheduler ; this involves: Dispatcher module gives control of the CPU to the process . Dispatcher Preemptive Scheduling CPU Scheduler CPU-I/O Burst Cycle Scheduling Algorithms Scheduling Criteria Basic Concepts . . . . 小结和作业 . Dispatcher 陈香兰 操作系统原理与设计

  16. . . . . . . Basic Concepts Scheduling Criteria Scheduling Algorithms . CPU-I/O Burst Cycle CPU Scheduler Preemptive Scheduling Dispatcher 小结和作业 . Dispatch latency 陈香兰 操作系统原理与设计

  17. . Scheduling Algorithms .. 2 Scheduling Criteria Scheduling Criteria . .. 3 FCFS Scheduling . SJF Scheduling Priority Scheduling Round Robin Scheduling Multilevel Queue Scheduling Multilevel Feedback Queue Scheduling . .. 4 . Dispatcher Preemptive Scheduling CPU Scheduler . . . . Basic Concepts Scheduling Criteria Scheduling Algorithms Scheduling Criteria . . . . .. 1 Basic Concepts CPU-I/O Burst Cycle 小结和作业 . Outline 小结和作业 陈香兰 操作系统原理与设计

  18. . Scheduling Criteria for long processes: may be 1 process per hour possible for short transactions: may be 10 processes per second . . Scheduling Algorithms execution per time unit Scheduling Criteria Basic Concepts . . . . different from one process set to another process set 小结和作业 . Scheduling Criteria I CPU utilization ( CPU 利用率) – keep the CPU as busy as conceptually: 0 % ∼ 100 % in a real system: 40 % ∼ 90 % Throughput (吞吐率) – # of processes that complete their 陈香兰 操作系统原理与设计

  19. . . Response time – amount of time it takes from when a the ready queue Waiting time – amount of time a process has been waiting in ready queue, executing on the CPU, and doing I/O. = the periods spent waiting to get into memory, waiting in the completion from the time of submission of a process to the time of particular process . output (for time-sharing environment) Scheduling Criteria Scheduling Algorithms Scheduling Criteria Basic Concepts . . . . request was submitted until the first response is produced, not 小结和作业 . Scheduling Criteria II Turnaround time ( 周转时间 )– amount of time to execute a 陈香兰 操作系统原理与设计

  20. . . different from system to system. . . . . . . . Stability? Average? response time waiting time turnaround time Minimize? throughput CPU utilization Maximize? . Scheduling Criteria Scheduling Algorithms Scheduling Criteria Basic Concepts . . . . 小结和作业 . Optimization Criteria 陈香兰 操作系统原理与设计

  21. . 3 Preemptive Scheduling Dispatcher . .. 2 Scheduling Criteria Scheduling Criteria . .. Scheduling Algorithms . FCFS Scheduling SJF Scheduling Priority Scheduling Round Robin Scheduling Multilevel Queue Scheduling Multilevel Feedback Queue Scheduling . .. 4 CPU Scheduler CPU-I/O Burst Cycle Basic Concepts 1 . . . . Basic Concepts Scheduling Criteria Scheduling Algorithms FCFS Scheduling SJF Scheduling Priority Scheduling Round Robin Scheduling Multilevel Queue Scheduling Multilevel Feedback Queue Scheduling . . . . .. 小结和作业 . Outline 小结和作业 陈香兰 操作系统原理与设计

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend