• edited by
9,090 views
7 7 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$

2 Answers

9 9 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
4 4 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:
Position:
Show:

Related questions

2 2 votes
2 2 answers
7.0k
7.0k views
Satbir asked Jan 13, 2020
7,034 views
Which of the following algorithms defines time quantum?shortest job scheduling algorithmround robin scheduling algorithmpriority scheduling algorithmmultilevel queue sche...
5 5 votes
4 4 answers
9.4k
9.4k views
Satbir asked Jan 13, 2020
9,428 views
The hardware implementation which provides mutual exclusion isSemaphoresTest and set instructionsBoth optionsNone of the options
6 6 votes
5 5 answers
10.3k
10.3k views
Satbir asked Jan 13, 2020
10,279 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 ...
7 7 votes
3 3 answers
7.3k
7.3k views
Satbir asked Jan 13, 2020
7,307 views
The following circuit compares two $2$-bit binary numbers, $X$ and $Y$ represented by $X_1X_0$ and $Y_1Y_0$ respectively. ($X_0$ and $Y_0$ represent Least Significant Bit...