• Courses
  • Tutorials
  • Jobs
  • Practice
  • Contests

OS CPU Scheduling

Question 11

Which of the following statements are true?
I. Shortest remaining time first scheduling may cause starvation
II. Preemptive scheduling may cause starvation
III. Round robin is better than FCFS in terms of response time
  • I only
  • I and III only
  • II and III only
  • I, II and III

Question 12

In the following process state transition diagram for a uniprocessor system, assume that there are always some processes in the ready state: Now consider the following statements:
I. If a process makes a transition D, it would result in 
   another process making transition A immediately.
II. A process P2 in blocked state can make transition E 
    while another process P1 is in running state.
III. The OS uses preemptive scheduling.
IV. The OS uses non-preemptive scheduling.
Which of the above statements are TRUE?
  • I and II
  • I and III
  • II and III
  • II and IV

Question 13

Group 1 contains some CPU scheduling algorithms and Group 2 contains some applications. Match entries in Group 1 to entries in Group 2.

     Group I                          Group II
(P) Gang Scheduling              (1) Guaranteed Scheduling
(Q) Rate Monotonic Scheduling    (2) Real-time Scheduling
(R) Fair Share Scheduling        (3) Thread Scheduling
  • P – 3 Q – 2 R – 1

  • P – 1 Q – 2 R – 3

  • P – 2 Q – 3 R – 1

  • P – 1 Q – 3 R – 2

Question 14

An operating system uses Shortest Remaining Time first (SRT) process scheduling algorithm. Consider the arrival times and execution times for the following processes:
Process  Execution time  Arrival time
P1             20            0
P2             25            15
P3             10            30
P4             15            45
What is the total waiting time for process P2?
  • 5
  • 15
  • 40
  • 55

Question 15

Consider three CPU-intensive processes, which require 10, 20 and 30 time units and arrive at times 0, 2 and 6, respectively. How many context switches are needed if the operating system implements a shortest remaining time first scheduling algorithm? Do not count the context switches at time zero and at the end.
  • 1
  • 2
  • 3
  • 4

Question 16

Three processes A, B and C each execute a loop of 100 iterations. In each iteration of the loop, a process performs a single computation that requires tc CPU milliseconds and then initiates a single I/O operation that lasts for tio milliseconds. It is assumed that the computer where the processes execute has sufficient number of I/O devices and the OS of the computer assigns different I/O devices to each process. Also, the scheduling overhead of the OS is negligible. The processes have the following characteristics:

 Process id      tc           tio
     A        100 ms    500 ms
     B        350 ms    500 ms
     C        200 ms    500 ms

The processes A, B, and C are started at times 0, 5 and 10 milliseconds respectively, in a pure time sharing system (round robin scheduling) that uses a time slice of 50 milliseconds. The time in milliseconds at which process C would complete its first I/O operation is ___________.

  • 500

  • 1000

  • 2000

  • 10000

Question 17

An operating system uses shortest remaining time first scheduling algorithm for pre-emptive scheduling of processes. Consider the following set of processes with their arrival times and CPU burst times (in milliseconds):
Process      Arrival Time    Burst Time
  P1           0               12
  P2           2               4
  P3           3               6
  P4           8               5
The average waiting time (in milliseconds) of the processes is _________.
  • 4.5
  • 5.0
  • 5.5
  • 6.5

Question 18

Consider the following set of processes, with the arrival times and the CPU-burst times given in milliseconds
  Process   Arrival Time    Burst Time
    P1          0              5
    P2          1              3
    P3          2              3
    P4          4              1
What is the average turnaround time for these processes with the preemptive shortest remaining processing time first (SRPT) algorithm ?
  • 5.50
  • 5.75
  • 6.00
  • 6.25

Question 19

A uni-processor computer system only has two processes, both of which alternate 10ms CPU bursts with 90ms I/O bursts. Both the processes were created at nearly the same time. The I/O of both processes can proceed in parallel. Which of the following scheduling strategies will result in the least CPU utilization (over a long period of time) for this system ?
  • First come first served scheduling
  • Shortest remaining time first scheduling
  • Static priority scheduling with different priorities for the two processes
  • Round robin scheduling with a time quantum of 5 ms

Question 20

Which of the following scheduling algorithms is non-preemptive?

  • Round Robin

  • First-In First-Out

  • Multilevel Queue Scheduling

  • Multilevel Queue Scheduling with Feedback

There are 56 questions to complete.

Last Updated :
Take a part in the ongoing discussion