260 views
5 5 votes

Consider a uniprocessor system with three processes $P_1, P_2$, and $P_3$ arriving at time $t=0$. Their burst times are $10,20 ,$ and $30$ units, respectively. The system uses a Round Robin scheduling algorithm with a time quantum of $5$ units. If the context switch overhead is $1$ unit (incurred every time a process is swapped out, including the last burst), what is the total completion time of the last process to finish?

1 Answer

1 1 vote

Total Burst Time: $10+20+30=60$ units.

Execution Order $($Quantum $=5):$

  1. $P_1(5), P_2(5), P_3(5)$
     
  2. $P_1(5) \rightarrow P_1$ finishes, $P_2(5), P_3(5)$
     
  3. $P_2(5), P_3(5)$
     
  4. $P_2(5) \rightarrow P_2$ finishes, $P_3(5)$
     
  5. $P_3(5), P_3(5) \rightarrow P_3$ finishes
     

Context Switches: There are $11$ switches between processes plus $1$ final switch after the last process completes $(12$ total$)$.

Total number of switches $=72$

Answer:
Position:
Show:

Related questions

4 4 votes
2 2 answers
225
225 views
GO Classes asked Feb 24
225 views
Consider a disk with $200$ tracks $(0-199)$. The current head position is at track $50$ and is moving towards higher track numbers. The request queue is: $82,170,43,140,2...
5 5 votes
2 2 answers
246
246 views
GO Classes asked Feb 24
246 views
A system uses a $\mathbf{3-}$level page table for virtual-to-physical address translation.The virtual address size is $\mathbf{39 ~bits}$.The page size is $\mathbf{4 K B}...
3 3 votes
1 1 answer
234
234 views
GO Classes asked Feb 24
234 views
A system has $n$ processes and $r$ identical resource instances. Each process requires a maximum of $m$ instances. What is the minimum number of resource instances $r$ re...
2 2 votes
3 3 answers
285
285 views
GO Classes asked Feb 24
285 views
Consider the following two-process synchronization code where $\verb|flag[0]|$ and $\verb|flag |$ are initialized to $\verb|false|$ and $\verb|turn|$ is initialized to $0...