Machine-translated by Google. Questions are authored in English.
Top

CPU Scheduling Algorithms Questions and Answers

21.

Pre-emptive scheduling is the strategy of temporarily suspending a gunning process

Exam Year(s)

UGC NET - 2012,

Answer: A

Pre-emptive scheduling suspends a running process before the CPU time slice expires.

In pre-emptive scheduling the operating system can take the CPU from a process that is still running, for example because a higher priority process has arrived, without waiting for the process to finish its quantum or give up the CPU. Allowing starving processes to run (B) is an aim of aging, suspension on an I/O request (C) happens in non-pre-emptive systems too, and avoiding collision (D) is not a scheduling concept.

Please log in or register to report this question.

22.

In round robin CPU scheduling as time quantum is increased the average turn around time

Exam Year(s)

UGC NET - 2012,

Answer: D

The average turn around time varies irregularly as the time quantum is increased.

In round robin scheduling, a larger quantum does not make the average turn around time rise or fall in a steady way. It depends on the burst lengths of the processes, and a small change in the quantum can cause a process to finish within one slice or to need another, so the average moves up and down. When the quantum becomes larger than every burst, round robin behaves like first come first served. Options (A), (B) and (C) claim a steady trend that does not hold in general.

Please log in or register to report this question.

23.

Consider a preemptive priority based scheduling algorithm based on dynamically changing priority. Larger priority number implies higher priority. When the process is waiting for CPU in the ready queue (but not yet started execution), its priority changes at a rate \(a = 2\). When it starts running, its priority changes at a rate \(b = 1\). All the processes are assigned priority value 0 when they enter ready queue. Assume that the following processes want to execute :

Process IDArrival TimeService Time
P104
P211
P322
P431

The time quantum \(q = 1\). When two processes want to join ready queue simultaneously, the process which has not executed recently is given priority. The finish time of processes P1, P2, P3 and P4 will respectively be

Exam Year(s)

UGC NET - 2013,

Answer: B

The finish times are 8, 2, 7 and 5. Because every process gets priority 0 whenever it enters the ready queue, each preempted process restarts at 0 and gains 2 per unit of waiting. Ties go to the process that has not run recently.

At t = 1, P1 rejoins with 0 and P2 arrives with 0, so P2 runs and finishes at 2. P1 has waited, so it gets priority 2 at t = 2 and runs until 3. P3 then runs 3 to 4, P4 (waiting from 3) ties with P1 at 4 and runs 4 to 5, finishing at 5. P1 runs 5 to 6, P3 runs 6 to 7 and finishes at 7, and P1 runs 7 to 8 and finishes at 8.

The other options have a different finish time for P2 or give P3 and P4 the wrong way round.

Please log in or register to report this question.

24.

Linux operating system uses

Exam Year(s)

UGC NET - 2013,

Answer: B

Linux uses fair preemptive scheduling. The kernel gives each runnable task a share of the processor and can preempt a running task when another deserves the CPU, in order to keep tasks treated fairly by priority and past use.

Affinity scheduling ties a thread to a CPU and is not the general Linux policy. Hand shaking is a communication term, and Highest Penalty Ratio Next is a variant of response-ratio scheduling that Linux does not use.

Please log in or register to report this question.

Loading…

Other Subjects

Tags: CPU Scheduling Algorithms Questions and Answers || CPU Scheduling Algorithms MCQ Questions and Answers || CPU Scheduling Algorithms GK Questions and Answers || CPU Scheduling Algorithms GK MCQ Questions || CPU Scheduling Algorithms Multiple Choice Questions and Answers || CPU Scheduling Algorithms GK || GK on CPU Scheduling Algorithms || Operating Systems Questions and Answers || Operating Systems MCQ Questions and Answers || Operating Systems GK Questions and Answers || GK on Operating Systems