in Operating System
14,257 views
5 votes
5 votes

Consider a set of 5 processes whose arrival time, CPU time needed and the priority are given below:

Process Priority Arrival Time (in ms) CPU Time Needed Priority
P1 0 10 5
P2 0 5 2
P3 2 3 1
P4 5 20 4
P5 10 2 3

(smaller the number, higher the priority)

If the CPU scheduling policy is priority scheduling without pre-emption, the average waiting time will be

  1. 12.8 ms
  2. 11.8 ms
  3. 10.8 ms
  4. 09,8 ms
in Operating System
14.3k views

2 Comments

can you send the gaint chart
0
0
what will be the ans if preemption is used
0
0

2 Answers

12 votes
12 votes
Best answer

Answer C

Process Arrival Time(AT) Burst Time(BT) Completion Time(CT) Turn Around Time(TAT) Waiting Time(WT)
P1 0 10 40 40 30
P2 0 5 5 5 0
P3 2 3 8 6 3
P4 5 20 28 23 3
P5 10 2 30 20 18
          total=54/5=10.8ms
selected by

2 Comments

please update the gantt.. chart...

i am feeling dificult to understand this...
0
0
pleaseeeeeeeeeeeeeeee explain the gantt chart.not able to solve these questions involving priority processes.
0
0
1 vote
1 vote

As per the request of gant chart and more explaination about this question i m give this solution

1 comment

May I know why process 2 is given higher priority in gantt chart when the priority for process 3 is higher i.e. 1?
0
0
Answer:

Related questions