in Operating System
517 views
1 vote
1 vote

Consider the following table
image:OSS2/Q20a.PNG
Using the shortest remaining time first, find the CPU utilization in %, if the context switching overhead is 1 unit.

  1.   30%
  2.   28.5%
  3.  29.5%
in Operating System
517 views

4 Comments

i guess i have made a wrong gannt chart,making agin i am getting total time as 45 thats because when second cPU burst of P1 is remaining and 9 units of first cpu burst of P2 has executed then,since only 1 unit is remaining (1<4)..so only P2 will continut..and after that 4 unit of I/O of P2 and 4 BT of P1 will overlap..?and then  aftr finishing BT of P1,remaining I/0 of P2 will start.will context switch occur here?
0
0
edited by

@akriti , answer can never be these 3. that  is for sure.Now there are 3 points where i am getting confusion. if that stackoverflow link is followed. so there is my answer. check it and let me know if you find any mistake in it.

https://drive.google.com/file/d/0B9VqtZXW82cZdnpLbXpkUXdwTDA/view?usp=sharing

0
0
mohit,i was getting total time as 45.

can we overlap I/O with context switch time??

and have u considered context switch in last case when P2 completes its I/O and goes for CPU??
0
0

Please log in or register to answer this question.