in Operating System edited by
5,114 views
2 votes
2 votes

Consider the following set of processes with the length of CPU burst time in milliseconds (ms) $:$

$\begin{array}{|l|l|l|l|l|l|l|} \hline  \textbf{Process} & \text{A} & \text{B} & \text{C} & \text{D} & \text{E} \\\hline \textbf{Burst time} & \text{6} &\text{1} & \text{2} & \text{1} & \text{5} \\\hline \textbf{Priority} & \text{3} & \text{1} & \text{3} & \text{4} & \text{2} \\\hline  \end{array}$

Assume that processes are stored in ready queue in following order $:$

$\text{A – B – C – D – E}$

Using round robin scheduling with time slice of $1$ ms, the average turn around time is

  1. $8.4$ ms
  2. $12.4$ ms
  3. $9.2$ ms
  4. $9.4$ ms
in Operating System edited by
5.1k views

4 Comments

Time  1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
Process B E A C D E A C E A E A E A A

Since the arrival time of all the process are 0, hence all red mark shows the turn around time of the process.

T.A.T of A = 15

T.A.T of B = 1 

T.A.T of C =  8

T.A.T of D = 5 

T.A.T of E = 13  

Average T.A.T = (15+1+8+5+13)/5 = 42/5= 8.4.

Ans- A.

1
1
@vijay,

why are we not considering the order here, bcoz , ready queue is like Linked list....
i mean , why are we not starting from A ? and starting according to the priority....?
0
0
@Kapil Sir,  Generally we are not given ready queue list when we have priority of processes, because we decide our ready queue on the basis of priority. But here initially we are given ready queue is given because arrival time of all process is same and priority of process A and C are same. So to distinguish scheduling of process A and C we have to use ready queue.

right sir ??
0
0
@vijay, yes, this is what i wanted . ready queue is just a method of showing that all the processes are arrived at the same time and now decide which to run based on priority , otherwise , no need of priority.

Thanks for clearing the doubt.. :)
1
1

1 Answer

2 votes
2 votes

ans will be A  8.4 ms 

2 Comments

Why we are not considering order of elements in the ready queue. The elements can be removed only from front in queue and not randomly from any location. Moreover they have not given whether smaller number is for higher priority or bigger number.
0
0
if not mentioned , smaller number is the highest priority just like rank , for ready queue doubt refer vijaycs 's comment
1
1
Answer:

Related questions