We read your photo as:
Draw Gantt charts and calculate average waiting times for SRTN and RR scheduling algorithms given specific processes.
Computer Science
ScanSolve AI Answer
c. i) Draw the Gantt charts for Shortest Remaining Time Next (SRTN) and Round Robin (RR) scheduling strategies using a time slice of 4 milliseconds.
Given processes:
- P1: Arrival Time = 0, Burst Time = 8
- P2: Arrival Time = 1, Burst Time = 4
- P3: Arrival Time = 2, Burst Time = 9
- P4: Arrival Time = 3, Burst Time = 5
SRTN Gantt Chart:
| P1 | P2 | P2 | P2 | P2 | P4 | P4 | P4 | P4 | P4 | P1 | P1 | P1 | P1 | P1 | P1 | P1 | P3 | P3 | P3 | P3 | P3 | P3 | P3 | P3 | P3 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
Round Robin (RR) Gantt Chart (Time Slice = 4ms):
| P1 | P2 | P3 | P4 | P1 | P3 | P4 | P3 |
|---|---|---|---|---|---|---|---|
| 0 4 8 12 16 20 24 25 26 |
c. ii) Calculate the average waiting times of each of the processes in each algorithm.
SRTN Algorithm:
- P1:
- Completion Time: 17
- Turnaround Time:
- Waiting Time: ms
- P2:
- Completion Time: 5
- Turnaround Time:
- Waiting Time: ms
- P3:
- Completion Time: 26
- Turnaround Time:
- Waiting Time: ms
- P4:
- Completion Time: 10
- Turnaround Time:
- Waiting Time: ms
Total Waiting Time = ms
Average Waiting Time (SRTN) =
Round Robin (RR) Algorithm (Time Slice = 4ms):
- P1:
- Completion Time: 20
- Turnaround Time:
- Waiting Time: ms
- P2:
- Completion Time: 8
- Turnaround Time:
- Waiting Time: ms
- P3:
- Completion Time: 26
- Turnaround Time: $26 - 2
Was this helpful?
Still stuck on this one?
Ask a follow-up, and the answer starts from this question.
Got a different question?Ask your own question
More Computer Science Questions
QDraw the Gantt charts for SRTN and Round Robin (RR) scheduling strategies given the following…QCalculate the average waiting time and turnaround time for processes P1, P2, P3, P4 using FCFS, SJF…QCalculate the average turnaround time for preemptive SJF (SRTF) scheduling with the given processes…QExplain and illustrate the Shortest Remaining Time Next (SRTN) and Round Robin (RR) CPU scheduling…QExplain how to estimate project schedules using a Gantt chart and confirm results with software.
Browse by topic:Algorithms

Handwritten Step-by-Step Solution
Get this as a handwritten image on WhatsApp — like a tutor wrote it for you.
Try on WhatsApp