2nd Assignment
2nd Assignment
ASSIGNMENT SHEETS
ASSIGNMENT NO.2
3. What is aging?
6. What is the main idea behind shortest job first scheduling (SJFS)?
9. What is semaphores?
help of diagram.
1. Consider the following set of processes, with the length of the CPU-
P1 10 3
P2 1 1
P3 2 3
P4 1 4
P5 5 2
The processes are assumed to have arrived in the order P1, P2, P3, P4,
(a) Draw three gantt charts illustrating the execution of these processes
using SJF(preemptive), a non-preemptive priority(a smaller priority
(b) What is the turnaround time of each process for each of the
(c) What is the waiting time of each process for each of the scheduling
algorithms in part a?
A B C D A B C D A B C D
P0 0 0 1 2 0 0 1 2 1 5 2 0
P1 1 0 0 0 1 7 5 0
P2 1 3 5 4 2 3 5 6
P3 0 6 3 2 0 6 5 2
P4 0 0 1 4 0 6 5 6
satisfied or not.