Module 1(Part 2-Process scheduling
Module 1(Part 2-Process scheduling
(1)Preemptive:
OS can take resource away. Use it for something else,
and then give it back later.
Examples: processor or I/O channel.
(2)Non-preemptive:
Once given, it cannot be reused until the process gives it
back. Examples: file space and terminal.
(1) Allocation:
Who gets what? Given a set of requests for
resources, which process should be given which
resources in order to make most efficient use of the
resources?
• Batch
• Interactive
• Real time
Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. All rights reserved. 0-13-6006639
Scheduling Algorithm Goals
Arrival Time
Burst Time
Completion Time
Turnarounnd Time
Waiting Time
Scheduling in Batch Systems
• Round-robin scheduling
• Priority scheduling
• Guaranteed scheduling
• Lottery Scheduling
• Fair Share Scheduling
Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. All rights reserved. 0-13-6006639
Round-Robin Scheduling
• Maintain a list of runnable processes.
• Length of quantum:
• Short: too much overhead
• Long: poor response time