Operating System (CS 604) Fall Semester 2006 Assignment No. 3
Operating System (CS 604) Fall Semester 2006 Assignment No. 3
Process 2 has a total of 20 units of work to perform. This process arrives just
behind P1.
Show the resulting schedule for the shortest-job-first (preemptive) and the round-
robin algorithms. Assume a time slice of 4 units for RR. What is the completion
time of each process under each algorithm?
Solution:
SJF
Start Time 0 2 3 5 6 8 9 11 28
Process P1 P2 P1 P2 P1 P2 P1 P2
Solution:
I/O bound processes generally spend most of their time in the wait queue while
an I/O operation is being performed. When their I/O finally completes, they will
generally not execute for a long time before they initiate the next I/O operation.
Therefore, they will be favored in scheduling relative to long-running processes.
However, if CPU-bound processes are blocked long enough by I/O-bound
processes, they too will eventually not have run for a long time and they will be
scheduled.