1 / 15

Scheduling Introduction to Scheduling

Scheduling Introduction to Scheduling. Bursts of CPU usage alternate with periods of I/O wait a CPU-bound process an I/O bound process. When to Schedule. 1. At process creation 2. At process termination 3. At blocking system calls 4. At I/O interrupt

sheri
Télécharger la présentation

Scheduling Introduction to Scheduling

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. SchedulingIntroduction to Scheduling • Bursts of CPU usage alternate with periods of I/O wait • a CPU-bound process • an I/O bound process

  2. When to Schedule 1. At process creation 2. At process termination 3. At blocking system calls 4. At I/O interrupt Preemtive and non-preemtive scheduling algorithms

  3. Goals of Scheduling

  4. Scheduling in Batch Systems (1) (a) First-come-first-served (FCFS) (b) Shortest-job-first (SJF) - provably optimal if all jobs are known in advance (c) Shortest-remaining-time-next (SRTN)

  5. Scheduling in Batch Systems (2) Three level scheduling

  6. Scheduling in Interactive Systems (1) • Round Robin Scheduling (a) list of runnable processes (b) list of runnable processes after B uses up its quantum Length of quantum: • too short=> waste of CPU time • too long => poor response

  7. Scheduling in Interactive Systems (2) A scheduling algorithm with four priority classes Static and dynamic priority allocations, e.g. 1/f.

  8. Scheduling in Interactive Systems (3) • Multiple queues • Shortest process next; aging (weighted average) • Guaranteed scheduling (1/n) • Lottery scheduling - biased randomness, passing tickets • Fair share scheduling

  9. Scheduling in Real-Time Systems Schedulable real-time system • Given • m periodic events • event i occurs within period Pi and requires Ci seconds • Then the load can only be handled if

  10. Policy versus Mechanism • Separate what is allowed to be done with how it is done • a process knows which of its children threads are important and need priority • Scheduling algorithm parameterized • mechanism in the kernel • Parameters filled in by user processes • policy set by user process

  11. Thread Scheduling (1) Possible scheduling of user-level threads • 50-msec process quantum, threads run 5 msec/CPU burst Application-specific thread schedulers

  12. Thread Scheduling (2) Possible scheduling of kernel-level threads • 50-msec process quantum • threads run 5 msec/CPU burst

  13. UNIX Scheduler The UNIX scheduler is based on a multilevel queue structure

  14. Scheduling in Windows (1) Mapping of Win32 priorities to Windows 2000 priorities

  15. Scheduling in Windows (2) Windows 2000 supports 32 priorities for threads

More Related