Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
4 views3 pages

Operating System 3

The document presents various scheduling algorithms for processes in a system, including pre-emptive priority, non-preemptive, first come first serve, pre-emptive shortest job first, and round-robin. Each algorithm is analyzed with respect to completion time, turnaround time, and waiting time for different processes. Average waiting times are calculated for each scheduling method, highlighting their efficiency.

Uploaded by

gracejamu4
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views3 pages

Operating System 3

The document presents various scheduling algorithms for processes in a system, including pre-emptive priority, non-preemptive, first come first serve, pre-emptive shortest job first, and round-robin. Each algorithm is analyzed with respect to completion time, turnaround time, and waiting time for different processes. Average waiting times are calculated for each scheduling method, highlighting their efficiency.

Uploaded by

gracejamu4
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

(I) Pre-emptive priority

Gnat Chat

P1 P2 P1 P5 P1 P3 P4
0.0 2.0 3.0 7.0 12.0 16.0 18.0 19.0

Completion Turnaround Waiting


Process Burst Time Arrival Time Time Time Time
P1 10 0.0 16 16 6
P2 1 2.0 3 1 0
P3 2 4.0 18 14 12
P4 1 6.0 19 13 12
P5 5 7.0 12 5 0

Average WT: 6 + 12 + 12 = 30

30
=6
5

(II) Non-preemptive

Gnat Chat

P1 P2 P5 P3 P4
0.0 10.0 11.0 16.0 18.0 19.0

Burst Arrival Completion Turnaround Waiting


Process Time Time Time Time Time

P1 1O 0.0 10 10 0
P2 1 2.0 11 9 8
P3 2 4.0 18 14 12
P4 1 6.0 19 13 12
P5 5 7.0 16 9 4

Average WT: 8 + 12 + 12 + 4 = 36

36
=7.2
5
(III) First come first save

Gnat Chat

P1 P2 P3 P4 P5
0.0 10.0 11.0 13.0 14.0 19.0

Burst Arrival Completion Turnaround Waiting


Process Time Time Time Time Time

P1 1O 0.0 10 10 0
P2 1 2.0 11 9 8
P3 2 4.0 13 9 7
P4 1 6.0 14 8 7
P5 5 7.0 19 12 7

Average WT: 8 + 7+ 7+ 7 = 29

29
=5.8
5

(IV) Pre-emptive shortest job first

Gnat Chat

P1 P2 P1 P3 P4 P5 P1
0.0 2.0 3.0 4.0 6.0 7.0 12.0 19.0

Completion Turnaround Waiting


Process Burst Time Arrival Time Time Time Time
P1 10 0.0 19 19 9
P2 1 2.0 3 1 0
P3 2 4.0 6 2 0
P4 1 6.0 7 1 0
P5 5 7.0 12 5 0

9
Average WT: =1.8
5
(V) Round-Robin

Gnat Chat

P1 P2 P3 P4 P1 P5 P1 P5 P1
0.0 3.0 4.0 7.0 9.0 10.0 13.0 16.0 18.0 19.0

Burst Arrival Completion Turnaround Waiting


Process Time Time Time Time Time

P1 10 0.0 19 19 9
P2 1 2.0 4 2 1
P3 2 4.0 7 3 1
P4 1 6.0 9 3 2
P5 5 7.0 18 11 6

Average WT: 9 + 1 + 1 + 2 + 6 = 19

19
=3.8
5

You might also like