OS Assignment2

OS Assignment2 - Ex) 5.12 a) FCFS: 0 10 11 13 14 19 b) SJF:...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
Ex) 5.12 a) FCFS: 0 10 11 13 14 19 b) SJF: 1. 1 2 4 9 19 c) Non-Preemptive priority: 0 1 6 16 18 19 d) Round Robin: P1 P2 P3 P4 P5 P1 P3 P5 P1 P5 P1 P5 P1 P5 P1 P1 P1 P1 P1 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
b) TAT (Turnaround time) = ET (Process end time) - AT (when process arrives) i) FCFS: P1 (TAT) = 10; P2 (TAT) = 11, P3 (TAT) = 13, P4 (TAT) = 14, P5 (TAT) = 19. ii) SJF: P1 (TAT) = 19; P2 (TAT) = 1, P3 (TAT) = 4, P4 (TAT) = 2, P5 (TAT) = 9. iii) Non-Preemptive Priority: P1 (TAT) = 16; P2 (TAT) = 1, P3 (TAT) = 18, P4 (TAT) = 19, P5 (TAT) = 6. iv) RR: P1 (TAT) = 19; P2 (TAT) = 2, P3 (TAT) = 7, P4 (TAT) = 4, P5 (TAT) = 14. c) WT (Waiting time) = TAT - BT (Burst time) i) FCFS: P1(10-10)= 0; P2 (11-1)= 10, P3(13-2) = 11, P4(14-1)= 13, P5(19-5)= 14. ii) SJF: P1(19-10)= 9; P2 (1-1)= 0, P3(4-2) = 2, P4(2-1)= 1, P5(9-5)= 4. iii) Non-Preemptive Priority: P1(1-10)= 6; P2 (1-1)= 0, P3(18-2) = 16, P4(19-1)= 18, P5(6-5)= 1. iv) RR: P1(19-10)= 9; P2 (2-1)= 1, P3(7-2) = 11, P4(4-1)= 3, P5(14-5)= 9.
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

This document was uploaded on 12/13/2010.

Page1 / 5

OS Assignment2 - Ex) 5.12 a) FCFS: 0 10 11 13 14 19 b) SJF:...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online