Question

In: Computer Science

What is the waiting time and Turnaround time of each process for each of the scheduling...

What is the waiting time and Turnaround time of each process for each of the scheduling algorithms? [12 Marks]
Job
Arrival Time
Burst(msec)
Priority
A
0
6
3 (Silver)
B
1
2
1 (Diamond)
C
3
5
3 (Silver)
D
5
3
4 (Bronze)
E
7
2
2 (Gold)
(a) First-Come-First-Served (FCFS) scheduling [2 Marks]
(b) Preemptive PRIORITY scheduling [2 Marks]
(c) Highest Response Ratio Next (HRRN) scheduling [2 Marks]
(d) Round Robin (RR) (quantum = 4) scheduling [2 Marks]
(e) Which of the foregoing scheduling policies provides the lowest waiting time for this set of jobs? What is the waiting time with this policy? (Show your work) [4 Marks]

Solutions

Expert Solution

Question:

Process AT BT Priority
A 0 6 3
B 1 2 1
C 3 5 3
D 5 3 4
E 7 2 2

a) FCFS

Process AT BT Priority TAT WT
A 0 6 3 6 0
B 1 2 1 7 5
C 3 5 3 10 5
D 5 3 4 11 8
E 7 2 2 11 9

Turn Around Time: Time Difference between completion time and arrival time.
Turn Around Time = Completion Time – Arrival Time

Waiting Time(W.T): Time Difference between turn around time and burst time.
Waiting Time = Turn Around Time – Burst Time

Average Waiting Time = (0+5+5+8+9)/5 = 5.4

Please find Gantt Charts of all scheduling policies:

b) Preemtive Priority Scheduling:

Process AT BT Priority TAT WT
A 0 6 3 10 4
B 1 2 1 2 0
C 3 5 3 12 7
D 5 3 4 13 10
E 7 2 2 2 0

Average Waiting Time = (4+0+7+10+0)/5 = 4.2

c) HRRN:

The name itself states that we need to find the response ratio of all available processes and select the one with the highest Response Ratio. A process once selected will run till completion.

Criteria – Response Ratio
Mode – Non-Preemptive

Response Ratio = (WT + BT)/BT

At t=6 conflict arises so calculate response ratio of B,C and D.

Response Ration (B) = (5+2)/2 = 3.5

Response Ration (C) = (3+5)/5 = 1.6

Response Ration (D) = (1+3)/3 = 1.33

So B will be selected.

At t=8 conflict arises so calculate response ratio of E,C and D.

Response Ration (E) = (1+2)/2 = 1.5

Response Ration (C) = (5+5)/5 = 2

Response Ration (D) = (3+3)/3 = 2

So C will be selected based on the arrival time as Respose Ration is same .

At t=13 conflict arises so calculate response ratio of E and D.

Response Ration (E) = (8+3)/3 = 3.66

Response Ration (D) = (6+2)/2 = 4

So D will be selected.

Process AT BT Priority TAT WT
A 0 6 3 6 0
B 1 2 1 7 5
C 3 5 3 10 5
D 5 3 4 11 8
E 7 2 2 11 9

Average Waiting Time = (0+5+5+8+9)/5 = 5.4

d) RR with time quantum 4:

Process AT BT Priority TAT WT
A 0 6 3 12 6
B 1 2 1 5 3
C 3 5 3 15 10
D 5 3 4 10 7
E 7 2 2 10 8

Average Waiting Time = (6+3+10+7+8)/5 = 6.8

e) Which of the foregoing scheduling policies provides the lowest waiting time for this set of jobs? What is the waiting time with this policy?

Preemtive Priority Scheduling has the lowest waiting times for the set of jobs. Average Waiting Time = (4+0+7+10+0)/5 = 4.2 which is lowest amingst all.


Related Solutions

What is the waiting time and Turnaround time of each process for each of the scheduling...
What is the waiting time and Turnaround time of each process for each of the scheduling algorithms? [12 Marks] Job Arrival Time Burst(msec) Priority A 0 6 3 (Silver) B 1 2 1 (Diamond) C 3 5 3 (Silver) D 5 3 4 (Bronze) E 7 2 2 (Gold) (a) First-Come-First-Served (FCFS) scheduling [2 Marks] (b) Preemptive PRIORITY scheduling [2 Marks] (c) Highest Response Ratio Next (HRRN) scheduling [2 Marks] (d) Round Robin (RR) (quantum = 4) scheduling [2 Marks]...
What is the waiting time and Turnaround time of each process for each of the scheduling...
What is the waiting time and Turnaround time of each process for each of the scheduling algorithms? [12 Marks] Job Arrival Time Burst(msec) Priority A 0 6 3 (Silver) B 1 2 1 (Diamond) C 3 5 3 (Silver) D 5 3 4 (Bronze) E 7 2 2 (Gold) (a) First-Come-First-Served (FCFS) scheduling [2 Marks] (b) Preemptive PRIORITY scheduling [2 Marks] (c) Highest Response Ratio Next (HRRN) scheduling [2 Marks] (d) Round Robin (RR) (quantum = 4) scheduling [2 Marks]...
What is the waiting time and Turnaround time of each process for each of the scheduling...
What is the waiting time and Turnaround time of each process for each of the scheduling algorithms? [12 Marks] Job Arrival Time Burst(msec) Priority A 0 6 3 (Silver) B 1 2 1 (Diamond) C 3 5 3 (Silver) D 5 3 4 (Bronze) E 7 2 2 (Gold) (a) First-Come-First-Served (FCFS) scheduling [2 Marks] (b) Preemptive PRIORITY scheduling [2 Marks] (c) Highest Response Ratio Next (HRRN) scheduling [2 Marks] (d) Round Robin (RR) (quantum = 4) scheduling [2 Marks]...
What is the waiting time and Turnaround time of each process for each of the scheduling...
What is the waiting time and Turnaround time of each process for each of the scheduling algorithms? Job Arrival Time Burst(msec) Priority A 0 6 3 (Silver) B 1 2 1 (Diamond) C 3 5 3 (Silver) D 5 3 4 (Bronze) E 7 2 2 (Gold) (a) First-Come-First-Served (FCFS) scheduling. (b) Preemptive PRIORITY scheduling . (c) Highest Response Ratio Next (HRRN) scheduling. (d) Round Robin (RR) (quantum = 4) scheduling. (e) Which of the foregoing scheduling policies provides the...
What is the waiting time and Turnaround time of each process for each of the scheduling...
What is the waiting time and Turnaround time of each process for each of the scheduling algorithms? [12 Marks] Job Arrival Time Burst(msec) Priority A 0 6 3 (Silver) B 1 2 1 (Diamond) C 3 5 3 (Silver) D 5 3 4 (Bronze) E 7 2 2 (Gold) (a) First-Come-First-Served (FCFS) scheduling [2 Marks] (b) Preemptive PRIORITY scheduling [2 Marks] (c) Highest Response Ratio Next (HRRN) scheduling (d) Round Robin (RR) (quantum = 4) scheduling (e) Which of the...
Urgent!! What is the waiting time and Turnaround time of each process for each of the...
Urgent!! What is the waiting time and Turnaround time of each process for each of the scheduling algorithms? [12 Marks] Job Arrival Time Burst(msec) Priority A 0 6 3 (Silver) B 1 2 1 (Diamond) C 3 5 3 (Silver) D 5 3 4 (Bronze) E 7 2 2 (Gold) (a) First-Come-First-Served (FCFS) scheduling [2 Marks] (b) Preemptive PRIORITY scheduling [2 Marks] (c) Highest Response Ratio Next (HRRN) scheduling [2 Marks] (d) Round Robin (RR) (quantum = 4) scheduling [2...
For Priority Scheduling, What is the arrival time, completion time, burst time, turnaround time, and the...
For Priority Scheduling, What is the arrival time, completion time, burst time, turnaround time, and the waiting time? discuss these terms further as they pertain to the efficiency of the algorithm as well as properties such as starvation. Pros and Cons of Priority Scheduling
What is the arrival time, completion time, burst time, turnaround time, and the waiting time of...
What is the arrival time, completion time, burst time, turnaround time, and the waiting time of First Come First Serve (FCFS)?
What is the arrival time, completion time, burst time, turnaround time, and the waiting time for...
What is the arrival time, completion time, burst time, turnaround time, and the waiting time for Shortest Remaining Time?
What is the arrival time, completion time, burst time, turnaround time, and the waiting time for...
What is the arrival time, completion time, burst time, turnaround time, and the waiting time for Priority Scheduling?
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT