Download presentation
Presentation is loading. Please wait.
Published byMarybeth Bennett Modified over 9 years ago
1
Operating Systems Scheduling
2
Bursts of CPU usage alternate with periods of waiting for I/O. (a) A CPU-bound process. (b) An I/O-bound process. Scheduling – Process Behavior
3
Batch Interactive Real time Categories of Scheduling Algorithms
4
Some goals of the scheduling algorithm under different circumstances. Scheduling Algorithm Goals
5
First Come First Served Shortest Job First Shortest Remaining-time Next High Response-radio First Batch Systems are usually non-preemptible. Scheduling in Batch Systems
6
Important variables Arrival time / Finish time (point) Waiting time / Executing time (period) Turnaround time = Waiting time + Executing time = Finish time – Arrival time Weighting turnaround time = Turnaround time / Executing time Response radio = Turnaround time / Executing time = 1 + Waiting time / Executing time
7
An example of shortest job first scheduling. (a) Running four jobs in the original order. (b) Running them in shortest job first order. Shortest Job First
8
Round-robin scheduling Priority scheduling Multiple queues Shortest process next Guaranteed scheduling Lottery scheduling Fair-share scheduling Scheduling in Interactive Systems
9
Round-robin scheduling. (a) The list of runnable processes. (b) The list of runnable processes after B uses up its quantum. Round-Robin Scheduling
10
A scheduling algorithm with four priority classes. Priority Scheduling
11
11 Scheduling in Real-Time Systems Schedulable real-time system Given m periodic events event i occurs within period P i and requires C i seconds Then the load can only be handled if
12
12 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
13
(a) Possible scheduling of user-level threads with a 50-msec process quantum and threads that run 5 msec per CPU burst. Thread Scheduling (1)
14
(b) Possible scheduling of kernel-level threads with the same characteristics as (a). Thread Scheduling (2)
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.