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?

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 lowest waiting time for this set of jobs? What is the waiting time with this policy? (Show your work)

Solutions

Expert Solution

(a) First-Come-First-Served (FCFS) scheduling:

A B C D E

0 6 8 13 16 18

Waiting time = start time - arrival time

Process Waiting time
A 0-0=0
B 6-1=5
C 8-3=5
D 13-5=8
E 16-7=9

Average wait time=(0+5+5+8+9)/5=5.4

Turnaround time =completion time -arrival time

process Turnaround time
A 6-0=6
B 8-1=7
C 13-3=10
D 16-5=11
E 18-7=11

Avg turnaround time=(6+7+10+11+11)/5=9

(b) Preemptive PRIORITY scheduling :

A B B A A E A C D

0 1 2 3 5 7 9 10 15 18

Turnaround time=completion time -arrival time

waiting time= turnaround time -burst time

process turnaround time waiting time
A 10-0=10 10-6=4
B 3-1=2 2-2=0
C 15-3=12 12-5=7
D 18-5=13 13-3=10
E 9-7=2 2-2=0

AVG WAITING TIME=21/5=4.2

(c) Highest Response Ratio Next (HRRN) scheduling:

A B C E D

0 6 8 13 15 18

process turnaroundtime watiting time
A 6-0=6 6-6=0
B 8-1=7 7-2=5
C 13-3=10 10-5=5
D 18-5=13 13-3=10
E 15-7=8 8-2=6

AVG WAITING TIME=26/5=5.2

d)round robin(quantum=4)

A B C D E A C

0 4 6 10 13 15 17 18

Turnaround time=completion time -arrival time

waiting time= turnaround time -burst time

process turnaround time waiting time
A 17-0=10 10-6=4
B 6-1=5 5-2=3
C 18-3=15 15-5=10
D 13-5=8 8-3=5
E 15-7=8 8-2=6

AVG WAITING TIME=5.6

e)Preemptive priority scheduling has least waiting time among all the scheduling mentioned above preemptive priority got the least average waiting time.Policy is average waiting time . Average Waiting time for preemptive priority scheduling is 4.2


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? [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 (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