1- Consider the following set of processes, with the length of the CPU-burst time given in
milliseconds:
Process burst Time Priority
P1 10 3
P2 1 1
P3 2 3
P4 1 4
P5 5 2
a. Draw a Gantt chart to show how these processes would be scheduled.
b. Give the turnaround time (total time from first arrival into ready state until CPU-burst
is completed) of each process.
c. Give the waiting time (total time spent in the Ready state) of each process.
d. Give the average waiting time of all the processes.
e. Create Program for SJF for above data.
2- Suppose the following three processes arrive for execution at the arrival times
indicated.
Process Arrival Time Burst Time
P1 0.0 8
P2 0.4 4
P3 1.0 1
a. Develop code for SJF scheduling using above given data.
Comments
Leave a comment