Consider the following process arrival list Consider the fol

Consider the following process arrival list: Consider the following scheduling methods: First-come first-served (FCFS) Shortest remaining time first (SRTF) Shortest-job first (SJF) Round-robin (RR), quantum = 5 Draw a Gantt chart (time line) showing which process is executing over time and calculate the average waiting time and average completion time.

Solution

a. FCFS

| A | B | C | D | E |

0 25 53 64 83 116

Average waiting time = (0+ (25-5) + (53-19) + (64-25) + (83-36) )/5 = 28 ms

Average completion time = ((25-0)+(53-5)+(64-19)+(83-25)+(116-36))/5 = 51.2 ms

c. SJF

| A | C | D | B | E |

0 25 36 55 83 116

Average waiting time = (0+(55-5)+((25-19)+(36-25)+(83-36))/5 = 22.8 ms

Average completion time = ((25-0)+(83-5)+(36-19)+(55-25)+(116-36))/5 = 46 ms

b. SRTF

| A | C | A | D | B | E |

0 19 30 36 55 83 116

Average waiting time = (0+(55-5)+(19-19)+(35-25)+(83-36))/5 = 21.4 ms

Average completion time = ((36-0)+(83-5)+(30-19)+(55-25)+(116-36))/5 = 47 ms

d. RR

| A | B | A | B | C | D | A | B | E | C | D | A | B | E | C | D | A | B | E | D | B | E | E | E | E |

0 5 10 15 20 25 30 35 40 45 50 55 60 65 70 71 76 81 86 91 95 98 103 108 113 116

Average waiting time = ((76-0)+(95-5)+(70-19)+(91-25)+(113-36))/5 = 72 ms

Average completion time = ((81-0)+(98-5)+(71-19)+(95-25)+(116-36))/5 = 75.2 ms

 Consider the following process arrival list: Consider the following scheduling methods: First-come first-served (FCFS) Shortest remaining time first (SRTF) Sho

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site