# Question & Answer: Rewrite this in digital text…..

Rewrite this in digital text

———————————————–

Don't use plagiarized sources. Get Your Custom Essay on
Question & Answer: Rewrite this in digital text…..
GET AN ESSAY WRITTEN FOR YOU FROM AS LOW AS \$13/PAGE

rst Coe Firsture Chantt chart o 20 32 4o 46 54 57 Response Time: A → 20 B→31 →38 D→43 E → 49 F→53 139 6 venage wai 29.5

First Come First Serve

Gantt Chart :

 A B C D E F

0   20 32 40 46 54 57

B C D E F

Waiting time = (20-1) + (32-2) + (40-3) + (46-5) + (57-7)
= 177

Response Time :
A->20
B->31
c->38
D->43
E->49
F->53

Average waiting Time = 177/6
= 29.5

SFJ (Non Preemptive) :

 A F D C E B

0 20 23 29 37 47 57

A B C D E F
Waiting Time = 0 + 44 + (29-2) + (23-3) + (37-5) + (20-7)
= 136

Average Waiting Time = 136/6
= 22.66

Response Time : A(20), B(56),C(35), D(26), E(40),F(16)

SFJ (Preemptive) :

 A B C D D F C E B A

0 1 2 3 7 9 12 19 27 38 57

A B C D E F
Waiting Time = 37 + 25 + 9 + 0 + 14 + 2
= 87

Average Waiting Time = 87/6
= 14.5

Response Time : A(57), B(37),C(17), D(6), E(22),F(5)

Priority(Preemptive) :

 A B C F A E D

0 1 13 21 24 43 51 57

Waiting Time = 23 + 0 + 11 + 48 + 38 + 14
= 134

Average Waiting Time = 134/6
= 22.33

Response Time : A(43), B(12),C(19), D(54), E(46),F(17)

Priority(Non Preemptive) :

 A B C F E D

0 20 32 40 43 51 57

Waiting Time = 0 + 19 + 30 + 48 + 38 + 33
= 168

Average Waiting Time = 168/6
= 28

Response Time : A(20), B(31),C(38), D(54), E(46),F(36)

Round Robin (q=5) :

 A B C D E A F B C D E A B A

0 5 10 15 20 25 30 33 38 41 42 45

Waiting Time = 37 + 39 + 31 + 33 + 32 + 23

= 195

Average Waiting Time = 195/6
= 32.5

Response Time : A(57), B(51),C(39), D(39), E(40),F(26)

SJF Preemptive is better as it has least average waiting time