• Courses
  • Tutorials
  • Jobs
  • Practice
  • Contests

OS CPU Scheduling

Question 21

Consider a set of n tasks with known runtimes r1, r2, .... rn to be run on a uniprocessor machine. Which of the following processor scheduling algorithms will result in the maximum throughput?

  • Round-Robin

  • Shortest-Job-First

  • Highest-Response-Ratio-Next

  • First-Come-First-Served

Question 22

Consider a uniprocessor system executing three tasks T1, T2 and T3, each of which is composed of an infinite sequence of jobs (or instances) which arrive periodically at intervals of 3, 7 and 20 milliseconds, respectively. The priority of each task is the inverse of its period and the available tasks are scheduled in order of priority, with the highest priority task scheduled first. Each instance of T1, T2 and T3 requires an execution time of 1, 2 and 4 milliseconds, respectively. Given that all tasks initially arrive at the beginning of the 1st milliseconds and task preemptions are allowed, the first instance of T3 completes its execution at the end of ______________ milliseconds.
  • 5
  • 10
  • 12
  • 15

Question 23

The maximum number of processes that can be in Ready state for a computer system with n CPUs is
  • n
  • n2
  • 2n
  • Independent of n

Question 24

For the processes listed in the following table, which of the following scheduling schemes will give the lowest average turnaround time?
Process    Arrival Time    Processing Time
  A              0              3
  B              1              6
  C              4              4
  D              6              2
  • First Come First Serve
  • Non-preemptive Shortest Job First
  • Shortest Remaining Time
  • Round Robin with Quantum value two

Question 25

Two concurrent processes P1 and P2 use four shared resources R1, R2, R3 and R4, as shown below.
P1 P2
Compute: Use R1; Use R2; Use R3; Use R4; Compute; Use R1; Use R2; Use R3;. Use R4;
Both processes are started at the same time, and each resource can be accessed by only one process at a time The following scheduling constraints exist between the access of resources by the processes:
  • P2 must complete use of R1 before P1 gets access to R1
  • P1 must complete use of R2 before P2 gets access to R2.
  • P2 must complete use of R3 before P1 gets access to R3.
  • P1 must complete use of R4 before P2 gets access to R4.
There are no other scheduling constraints between the processes. If only binary semaphores are used to enforce the above scheduling constraints, what is the minimum number of binary semaphores needed?  
  • 1
  • 2
  • 3
  • 4

Question 26

We wish to schedule three processes P1, P2 and P3 on a uniprocessor system. The priorities, CPU time requirements and arrival times of the processes are as shown below.
 
 Process   Priority          CPU time required     Arrival time (hh:mm:ss)  
 P1 10(highest) 20 sec 00:00:05
 P2 9 10 sec 00:00:03
 P3 8 (lowest) 15 sec 00:00:00

We have a choice of preemptive or non-preemptive scheduling. In preemptive scheduling, a late-arriving higher priority process can preempt a currently running process with lower priority. In non-preemptive scheduling, a late-arriving higher priority process must wait for the currently executing process to complete before it can be scheduled on the processor.

 What are the turnaround times (time from arrival till completion) of P2 using preemptive and non-preemptive scheduling respectively.

  • 30 sec, 30 sec

  • 30 sec, 10 sec

  • 42 sec, 42 sec

  • 30 sec, 42 sec

Question 27

Consider an arbitrary set of CPU-bound processes with unequal CPU burst lengths submitted at the same time to a computer system. Which one of the following process scheduling algorithms would minimize the average waiting time in the ready queue?

  • Shortest remaining time first

  • Round-robin with time quantum less than the shortest CPU burst

  • Uniform random

  • Highest priority first with priority proportional to CPU burst length

Question 28

Which of the following disk strategies is likely to give the best throughput?
  • Farthest cylinder next
  • Nearest cylinder next
  • First come first served
  • Elevator algorithm

Question 29

Consider the following processes, with the arrival time and the length of the CPU burst given in milliseconds. The scheduling algorithm used is preemptive shortest remaining-time first. z5 The average turn around time of these processes is ___________ milliseconds.   Note : This question was asked as Numerical Answer Type.
  • 8.25
  • 10.25
  • 6.35
  • 4.25

Question 30

Consider n jobs J1, J2,......Jn such that job Ji has execution time ti and a non-negative integer weight wi. The weighted mean completion time of the jobs is defined to be [Tex] \\frac{\\sum_{i=1}^{n} w_i T_i}{\\sum_{i=1}^{n} w_i}[/Tex], where Ti is the completion time of job Ji. Assuming that there is only one processor available, in what order must the jobs be executed in order to minimize the weighted mean completion time of the jobs?
  • Non-decreasing order of ti
  • Non-increasing order of wi
  • Non-increasing order of witi
  • None-increasing order of wi/ti

There are 56 questions to complete.

Last Updated :
Take a part in the ongoing discussion