edited by
4,182 views
4 votes
4 votes

Three CPU-bound tasks, with execution times of $15,12$ and $5$ time units respectively arrive at times $0,t$ and $8$, respectively. If the operating system implements a shortest remaining time first scheduling algorithm, what should be the value of $t$ to have $4$ context switches? Ignore the context switches at time $0$ and at the end.

  1. $0<t<3$
  2. $t=0$
  3. $t<=3$
  4. $3<t<8$
edited by

2 Answers

6 votes
6 votes
P1 comes at 0 and executes till t now look at the burst times for the process p1 and p2  so for a context switch to take place burst time for p2 has to be less than p1 12<15-t , t<3 so t value can be anything between 0 to 3 option A is the correct answer
1 votes
1 votes

Also fails at t = 0. at t=0,context switches=3 Option B,C eliminated.

 

But at t = 2, we get 4 context switches. So, Option A

Answer:

Related questions

2 votes
2 votes
1 answer
1
Satbir asked Jan 13, 2020
6,009 views
Which of the following algorithms defines time quantum?shortest job scheduling algorithmround robin scheduling algorithmpriority scheduling algorithmmultilevel queue sche...
4 votes
4 votes
4 answers
2
Satbir asked Jan 13, 2020
5,189 views
The hardware implementation which provides mutual exclusion isSemaphoresTest and set instructionsBoth optionsNone of the options
6 votes
6 votes
4 answers
3
Satbir asked Jan 13, 2020
5,552 views
Consider the following page reference string.$1\ 2\ 3\ 4\ 2\ 1\ 5\ 6\ 2\ 1\ 2\ 3\ 7\ 6\ 3\ 2\ 1\ 2\ 3\ 6\ $What are the minimum number of frames required to get a single ...