recategorized by
16,085 views
47 votes
47 votes

The sequence __________ is an optimal non-preemptive scheduling sequence for the following jobs which leaves the CPU idle for ________ unit(s) of time.$$\small \begin{array}{|c|c|c|} \hline  \textbf{Job} & \textbf{Arrival Time} & \textbf{Burst Time} \\\hline 1 & 0.0 & 9 \\\hline  2 & 0.6 & 5 \\\hline 3 & 1.0 & 1 \\\hline \end{array}$$

  1. $\{3, 2, 1\}, 1$
  2. $\{2, 1, 3\}, 0$
  3. $\{3, 2, 1\}, 0$
  4. $\{1, 2, 3\}, 5$
recategorized by

5 Answers

Best answer
60 votes
60 votes

Answer is (A).
Here, in option B and C they have given CPU idle time is $0$ which is not possible as per schedule (B) and (C).
So, (B) and (C) are eliminated.

Now, lets see (A) and (D):

For (A),

So, idle time is between $0$ and $1$ which is $1$ in case of option (A).

For option (D),

We can see that there is no idle time at all, but in option given idle time is $5$, which is not matching with our chart so option (D) is eliminated.

Therefore, the correct sequence is option (A).

edited by
19 votes
19 votes

(D) CPU idle time will be 0.
(C) CPU idle time will be 1.
(B) CPU Idle Time will be 0.6
(A) CPU idle time will be 1.

Hence, (A) is correct answer!

5 votes
5 votes
Answar is A, CPU will be idle for first 1 unit
2 votes
2 votes
Assuming optimal is with respect to the total waiting time (a) is correct.

Total waiting times are

(a) 0 + 1.4 + 7 = 8.4, idle time = 1

(b) 0 + 5.6 + 14.6 = 20.1, idle time = 0.6

(c) 0 + 1.4 + 7 = 8.4, idle time = 1

(d) 0 + 9 + 14 = 23, idle time = 0

http://www.cs.uic.edu/~jbell/CourseNotes/OperatingSystems/5_CPU_Scheduling.html
Answer:

Related questions

39 votes
39 votes
4 answers
1
Kathleen asked Oct 8, 2014
13,052 views
Which scheduling policy is most suitable for a time shared operating system?Shortest Job FirstRound RobinFirst Come First ServeElevator
25 votes
25 votes
3 answers
2
Kathleen asked Oct 8, 2014
10,467 views
In a virtual memory system the address space specified by the address lines of the CPU must be _____ than the physical memory size and ____ than the secondary storage siz...