exercise (5). exercise assume the following jobs are executed with one processor, with the jobs...
TRANSCRIPT
![Page 1: Exercise (5). Exercise Assume the following jobs are executed with one processor, with the jobs arriving in the order listed in the table. – Suppose a](https://reader035.vdocuments.us/reader035/viewer/2022072007/56649d345503460f94a0b283/html5/thumbnails/1.jpg)
Exercise (5)
![Page 2: Exercise (5). Exercise Assume the following jobs are executed with one processor, with the jobs arriving in the order listed in the table. – Suppose a](https://reader035.vdocuments.us/reader035/viewer/2022072007/56649d345503460f94a0b283/html5/thumbnails/2.jpg)
Exercise
• Assume the following jobs are executed with one processor, with the jobs arriving in the order listed in the table. – Suppose a system uses RR scheduling with a quantum of
15. Create a Gantt chart illustrating these processes.
– What is the turnaround time for process p3?
– What is the average waiting time for processes?
2
i (pi)
0 80
1 20
2 10
3 20
4 50
![Page 3: Exercise (5). Exercise Assume the following jobs are executed with one processor, with the jobs arriving in the order listed in the table. – Suppose a](https://reader035.vdocuments.us/reader035/viewer/2022072007/56649d345503460f94a0b283/html5/thumbnails/3.jpg)
3
p1 p2 p3
Avg. waiting time of RR is:
i (pi)
0 80
1 20
2 10
3 20
4 50
p0
p4
0
0
FCFS:
SJN:
Turnaround time of process p3 with RR :
![Page 4: Exercise (5). Exercise Assume the following jobs are executed with one processor, with the jobs arriving in the order listed in the table. – Suppose a](https://reader035.vdocuments.us/reader035/viewer/2022072007/56649d345503460f94a0b283/html5/thumbnails/4.jpg)
Exercise• Assume the following jobs are executed with one
processor, with the job arriving time listed in the table. – Suppose a system uses preemptive SJN scheduling. Create
a Gantt chart illustrating these processes.
– What is the turnaround time for process p3?
– What is the average waiting time for processes?
4
i (pi) Arrival time
0 80 0
1 20 10
2 10 30
3 20 35
4 50 40
![Page 5: Exercise (5). Exercise Assume the following jobs are executed with one processor, with the jobs arriving in the order listed in the table. – Suppose a](https://reader035.vdocuments.us/reader035/viewer/2022072007/56649d345503460f94a0b283/html5/thumbnails/5.jpg)
5
p1 p2
p3
Avg. waiting time of preemptive SJN is:
p0
p4
0
0
FCFS:
SJN:
Turnaround time of process p3 with preemptive SJN:
i (pi) Arrival time
0 80 0
1 20 10
2 10 30
3 20 35
4 50 40