4.process Scheduling
4.process Scheduling
Process Scheduling
Email: [email protected]
Scheduling
• When a computer is multi-programmed, it
frequently has multiple processes or threads
competing for the CPU at the same time
QUEUEING TIME Time on a queue waiting for service from the device. (seconds)
THINK TIME The time spent by the user of an interactive system to figure out the next
request. (seconds)
The goal is to optimize both the average and the amount of variation
5
Categories of Scheduling Algorithms
•Batch
•Interactive
•Real time
Scheduling Algorithm Goals
For example :
(a)FIFO (b)SJF
14
Round Robin Scheduling
R.R scheduling is easy and fair the only problem is how to
choose the length of quantum
(a) Possible scheduling of user-level threads with a 50-msec process quantum and
threads that run 5 msec per CPU burst.
(b) ) Possible scheduling of kernel-level threads with the same characteristics as (a).
Programming Assignment 2–CPU Scheduling
15 March 2017
Design & Implement a program that simulates the Shortest Job
First (SJF), Round Robin and Priority scheduling:
Assuming that all the jobs will arrive at the same time. Your
program must calculate the
following:
1. Average Waiting Time (AWT)
2. Average Response Time (ART)
3. Average Turnaround Time (ATT)
Waiting Time: Amount of time spent ready to run but not running.
Response Time: Time between submission of requests and first
response to the request.
Turnaround Time: Mean time from submission to completion of
process.