Process-Scheduling

Question 1
In real time operating systems, which of the following is the most suitable scheduling scheme?
A
Round Robin
B
First come first serve
C
preemptive
D
random scheduling
       Operating-Systems       Process-Scheduling       Nielit Scientist-C 2016 march
Question 1 Explanation: 
● A real-time operating system (RTOS) is any operating system (OS) intended to serve real-time applications that process data as it comes in, typically without buffer delays.
● Processing time requirements (including any OS delay) are measured in tenths of seconds or shorter increments of time.
● A real time system is a time bound system which has well defined fixed time constraints. Processing must be done within the defined constraints or the system will fail. They either are event driven or time sharing.
● Event driven systems switch between tasks based on their priorities while time sharing systems switch the task based on clock interrupts. Most RTOS’s use a pre-emptive scheduling algorithm.
Question 2
In a lottery scheduler with 40 tickets, how we will distribute the tickets among 4 processes and such that each process gets 10%, 5%, 60% and 25% respectively?
A
a
B
b
C
c
D
d
       Operating-Systems       Process-Scheduling       ISRO CS 2015
Question 2 Explanation: 
Total number of tickets =40
Total 4 processors:

Question 3

Which of the following statements is FALSE?

A
The long term scheduler controls the degree of multiprogramming
B
Multiple process of a single program cannot exist
C
Ready queue of the processes resides in main memory
D
A process can have multiple sub processes
       Operating-Systems       Process-Scheduling       JT(IT) 2018 PART-B Computer Science
Question 3 Explanation: 
→ Long term scheduler controls the degree of multiprogramming.
→ Ready queue of the processes resides in main memory.
→ A process can have multiple sub processes.
→ Multiple process of a single program cannot exist because each program can have only one process.
Question 4
Consider three processes(process id 0,1,2 respectively) with compute time bursts 2,4 and 8 time units. All processes arrive at time zero. Consider the Longest remaining time first(LRTF) scheduling algorithm. In LRTF ties are broken by giving priority to the process with the lowest process id. The average turnaround time is:
A
13 units
B
14 units
C
15 units
D
16 units
       Operating-Systems       Process-Scheduling       Nielit Scientist-B IT 22-07-2017
Question 4 Explanation: 
Algorithm: LRTF (Longest Remaining Time First)

Avg TAT = 12+13+14/3 = 39/3 = 13 units
Question 5
Consider three processes, all arriving at time zero, with total execution time of 10,20 and 30 units, respectively. Each process spends the first 20% of execution time doing I/O, the next 70% of time doing computations, and the last 10% of time doing I/O again. The operating system uses a shortest remaining compute time first scheduling algorithm and schedules a new process either when the running process gets blocked on I/O or when the running process finishes its compute burst. Assume that all I/O operations can be overlapped as much as possible. For what percentage f time does the CPU remain idle?
A
0%
B
10.6%
C
30.0%
D
89.4%
       Operating-Systems       Process-Scheduling       Nielit Scientist-B IT 22-07-2017
Question 5 Explanation: 

Total time needed to complete the execution = 47
Idle time = 2+3 = 5
Percentage of Idle time = 5/47 × 100 =10.6%
Question 6
Consider three CPU-intensive processes which require 10,20 and 30 time units and arrive at times 0,2 and 6, respectively. How 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.
A
1
B
2
C
3
D
4
       Operating-Systems       Process-Scheduling       Nielit Scientist-B IT 22-07-2017
Question 6 Explanation: 

Total no.of context switches is 2.
Question 7
Which of the following process scheduling algorithm may lead to starvation?
A
FIFO
B
Round Robin
C
Shortest Job Next
D
None of the option
       Operating-Systems       Process-Scheduling       Nielit Scientist-B IT 22-07-2017
Question 7 Explanation: 
● Starvation is method in which process with high priorities continuously uses the resources preventing low priority process to acquire the resources
● In the Shortest job next scheduling shortest job process will run first and later higher burst time.Here the process with higher burst time need to wait for longer time.
Question 8
A scheduling algorithm assigns priority proportional to the waiting time of a process. Every process starts with priority zero(the lowest priority). The scheduler re-evaluates the process priorities every T time units and decides the next process to schedule. Which one of the following is TRUE if the processes have no I/O operations and all arrive at time zero?
A
This algorithm is equivalent to the first come first serve algorithm
B
This algorithm is equivalent to the round-robin algorithm
C
This algorithm is equivalent t the shortest-job-first algorithm
D
This algorithm is equivalent to the shortest-remaining time-first algorithm
       Operating-Systems       Process-Scheduling       Nielit Scientist-B IT 22-07-2017
Question 8 Explanation: 
Let's take an example:

Consider scheduler schedule processes priority after S times units so order of execution will be P1 P2 P3 P4 P1 P2 P3 P4 (S< execution time of any process) which is exactly same as round robin so answer – B.
Question 9
Which of the following scheduling algorithm could result in starvation?
A
Priority
B
Round Robin
C
FCFS
D
none of the above
       Operating-Systems       Process-Scheduling       Nielit Scientific Assistance IT 15-10-2017
Question 9 Explanation: 
Priority scheduling algorithm could result starvation. Starvation is nothing but indefinite blocking.
Question 10

State whether TRUE or FALSE

    (i) Shortest remaining time (SRT) algorithm is the preemptive version of the shortest job next(SJN) CPU scheduling algorithm
    (ii) A “context switch” is the mechanism to store and restore the state or context of a CPU in PCB
A
(i) True, (ii) True
B
(i) False, (ii) False
C
(i) False, (ii) True
D
(i) True, (ii) False
       Operating-Systems       Process-Scheduling       JT(IT) 2018 PART-B Computer Science
Question 10 Explanation: 
TRUE: Shortest remaining time (SRT) algorithm is the preemptive version of the shortest job next(SJN) CPU scheduling algorithm.
TRUE: A “context switch” is the mechanism to store and restore the state or context of a CPU in PCB.
Question 11
If a process is runnable but is temporarily stopped to let another process run, in which state is the process said to be?
A
Running
B
Ready
C
Interrupted
D
Blocked
       Operating-Systems       Process-Scheduling       KVS DEC-2013
Question 11 Explanation: 
1. New
A program which is going to be picked up by the OS into the main memory is called a new process.
2. Ready
Whenever a process is created, it directly enters in the ready state, in which, it waits for the CPU to be assigned. The OS picks the new processes from the secondary memory and put all of them in the main memory. The processes which are ready for the execution and reside in the main memory are called ready state processes.
3. Running
One of the processes from the ready state will be chosen by the OS depending upon the scheduling algorithm.
4. Block or wait
From the Running state, a process can make the transition to the block or wait state depending upon the scheduling algorithm or the intrinsic behavior of the process.
Question 12
The diagram given below represents
A
Process creation
B
Process state
C
Queueing diagram
D
Communication model
       Operating-Systems       Process-Scheduling       KVS DEC-2013
Question 12 Explanation: 
The above diagram represents queueing diagram. Various queues are
→ All processes, upon entering into the system, are stored in the Job Queue.
→ Processes in the Ready state are placed in the Ready Queue.
→ Processes waiting for a device to become available are placed in Device Queues. There are unique device queues available for each I/O device.
Question 13
Consider a set of n tasks with known runtimes R​1​ ,R2​ ,Rn​ , to be run uniprocessor machine. Which of the following processor scheduling algorithm will result in the maximum throughput?
A
Priority scheduling
B
Round robin
C
FCFS
D
SJF
       Operating-Systems       Process-Scheduling       KVS DEC-2017
Question 13 Explanation: 
→ In shortest job first scheduling algorithm, the processor selects the process with the smallest execution time to execute next.
→ SJF scheduling algorithm will result in the maximum throughput
Question 14
The problem of indefinite blockage of low priority jobs in general priority scheduling algorithm can be solved using
A
Swapping
B
Dirty bit
C
Aging
D
Compaction
       Operating-Systems       Process-Scheduling       KVS DEC-2017
Question 14 Explanation: 
→ Ageing is a scheduling technique used to avoid starvation. Fixed priority scheduling is a scheduling discipline, in which tasks queued for utilizing a system resource are assigned a priority each.
→ A task with a high priority is allowed to access a specific system resource before a task with a lower priority is allowed to do the same.
→ A disadvantage of this approach is that tasks assigned with a lower priority may be starved when a large number of high priority tasks are queued. Aging is used to gradually increase the priority of a task, based on its waiting time in the ready queue.
Question 15
If the time quantum size is 2 units of an there is only one job of 14 time unit in a ready queue, the round robin scheduling algorithm will cause___ connected switches.
A
1
B
5
C
6
D
7
       Operating-Systems       Process-Scheduling       KVS DEC-2017
Question 15 Explanation: 
→ Actually they are given single job, so when we are using round robin algorithm it won’t perform any context switch because we are executing same job.
→ But according to their intention will cause total 6 switches. 0-2, 2-4, 4-6, 6-8, 8-10, 10-12, 12-14. We are initially started with 0. So, It will take 6 connected switches
Note: We thought they made this question wrong.
Question 16
Three processes are scheduled for execution.
Arrival times and time units required for execution are given below:

Which of the following is the correct completion order if RR scheduling algorithm is used with time quantum of 2 units?
A
P1,P2,P3
B
P1,P3,P2
C
P3,P1,P2
D
P2,P1,P3
       Operating-Systems       Process-Scheduling       KVS 30-12-2018 Part B
Question 16 Explanation: 
The gantt chart of the above RR scheduling algorithm is

The completion of order of processes are P3,P1 and P2
Question 17
Which of the following scheduling algorithms may cause starvation ?
a. First-come-first-served
b. Round Robin
c. Priority
d. Shortest process next
e. Shortest remaining time first
A
a, c and e
B
c, d and e
C
b, d and e
D
b, c and d
       Operating-Systems       Process-Scheduling       UGC NET CS 2017 Jan -paper-2
Question 17 Explanation: 
→ Starvation is the name given to the indefinite postponement of a process because it requires some resource before it can run, but the resource, though available for allocation, is never allocated to this process.
1. Priority: A process ready to run for CPU can wait indefinitely because of low priority
2. Shortest process next : longest process possibility to get starvation
3. Shortest remaining time first: longest process possibility to get starvation
Solution: Aging
→ FCFS and Round Robin scheduling never happen indefinite blocking.
Question 18
Match the following
A
a-3, b-4, c-2, d-1
B
a-4, b-3, c-2, d-1
C
a-2, b-4, c-1, d-3
D
a-3, b-4, c-1, d-2
       Operating-Systems       Process-Scheduling       UGC NET CS 2004 Dec-Paper-2
Question 18 Explanation: 
Disk scheduling→ SCAN,C-SCAN,LOOK,C-LOOK
Batch processing→ FIFO
Time sharing→ Round robin with the help of time quantum.
Interrupt processing→ LIFO
Question 19
____________ is one of preemptive scheduling algorithm.
A
Shortest-Job-first
B
Round-robin
C
Priority based
D
Shortest-Job-next
       Operating-Systems       Process-Scheduling       UGC NET CS 2006 Dec-paper-2
Question 19 Explanation: 
→ SJF scheduling algorithm is either preemptive and Nonpreemptive.
→ Round robin is purely Nonpreemptive.
→ Priority based scheduling also preemptive and Nonpreemptive.
→ Shortest-Job-next scheduling algorithm is either preemptive and Nonpreemptive.
Question 20
In processor management, round robin method essentially uses the preemptive version of __________ .
A
FILO
B
FIFO
C
SJF
D
Longest time first
       Operating-Systems       Process-Scheduling       UGC NET CS 2006 June-Paper-2
Question 20 Explanation: 
Round robin method essentially uses the preemptive version of FIFO. Because of time quantum, it preempt every process in FIFO order. But it is not FIFO exactly because of preemption. In FIFO won’t support preemption.
Question 21
Match the following :
A
a-iii, b-i, c-ii, d-iv
B
a-iv, b-i, c-iii, d-ii
C
a-iv, b-iii, c-i, d-ii
D
a-iii, b-iii, c-ii, d-i
       Operating-Systems       Process-Scheduling       UGC NET CS 2013 Sep-paper-2
Question 21 Explanation: 
Ready→ Running: The process is dispatched.
Blocked→ Ready: Request made by the process is satisfied or an event for which it was waiting occurs.
Running→ Blocked: Process wishes to wait for some action by another process.
Running→ Ready: The process is preempted.
Question 22
Consider the following three processes with the arrival time and CPU burst time given in milliseconds :

The Gantt Chart for preemptive SJF scheduling algorithm is
A
B
C
D
       Operating-Systems       Process-Scheduling       UGC NET CS 2018 JUNE Paper-2
Question 22 Explanation: 
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 :

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
A
4, 5, 7 and 8
B
8, 2, 7 and 5
C
2, 5, 7 and 8
D
8, 2, 5 and 7
       Operating-Systems       Process-Scheduling       UGC NET CS 2013 Dec-paper-2
Question 23 Explanation: 
Given data,

Question 24
Preemptive scheduling is the strategy of temporarily suspending a gunning process
A
Before the CPU time slice expires
B
To allow starving processes to run
C
When it requests I/O
D
To avoid collision
       Operating-Systems       Process-Scheduling       UGC NET CS 2012 June-Paper2
Question 24 Explanation: 
→ Preemptive scheduling is the strategy of temporarily suspending a gunning process before the CPU time slice expires.
→ Preemptive scheduling means the processes is always interrupted by higher priorities.
Question 25
The only state transition that is initiated by the user process itself is
A
block
B
dispatch
C
wakeup
D
none of the above
       Operating-Systems       Process-Scheduling       NIELIT Junior Teachnical Assistant_2016_march
Question 26
How many states can a process be in ?
A
3
B
4
C
2
D
5
       Operating-Systems       Process-Scheduling       UGC NET CS 2011 June-Paper-2
Question 26 Explanation: 
Process states
1. New→ The process is being created.
2. Running→ Instructions are being executed.
3. Waiting→ The process is waiting for some event to occur
4. Ready→ The process is waiting to be assigned to a processor
5. Terminated→ The process has finished execution
Question 27
A virtual memory based memory management algorithm partially swaps out a process. This is an example of
A
short term scheduling
B
long term scheduling
C
medium term scheduling
D
mutual exclusion
       Operating-Systems       Process-Scheduling       UGC NET CS 2013 June-paper-2
Question 27 Explanation: 
A virtual memory based memory management algorithm partially swaps out a process. This is an example of medium term scheduling.
Medium-term scheduling:The decision to add to the number of processes that are partially or fully in main memory.
Long-term scheduling:The decision to add to the pool of processes to be executed.
Short-term scheduling:The decision as to which available process will be executed by the processor.
Question 28
Match the following :  
A
(a)-3, (b)-4, (c)-2, (d)-1
B
(a)-4, (b)-3, (c)-2, (d)-1
C
(a)-2, (b)-4, (c)-1, (d)-3
D
(a)-1, (b)-4, (c)-3, (d)-2
       Operating-Systems       Process-Scheduling       UGC NET CS 2010 June-Paper-2
Question 28 Explanation: 
Disk Scheduling→ SCAN
Batch Processing→ FIFO
Time Sharing→ Round-robin
Interrupt Processing→ LIFO
Question 29
_______ is one of preemptive scheduling algorithm.
A
RR
B
SSN
C
SSF
D
Priority based
       Operating-Systems       Process-Scheduling       UGC NET CS 2010 June-Paper-2
Question 29 Explanation: 
Round Robin(RR) is one of preemptive scheduling algorithm. Priority based scheduling is non preemptive.
Question 30
Four jobs J1, J2, J3 and J4 are waiting to be run. Their expected run times are 9, 6, 3 and 5 respectively. In order to minimise average response time, the jobs should be run in the order:
A
J1 J2 J3 J4
B
J4 J3 J2 J1
C
J3 J4 J1 J2
D
J3 J4 J2 J1
       Operating-Systems       Process-Scheduling       UGC NET CS 2008 Dec-Paper-2
Question 30 Explanation: 
Since arrival time is not given assume arrival time of each process as"0" Option (A):


Question 31
An example of a non-preemptive scheduling algorithm is :
A
Round Robin
B
Priority Scheduling
C
Shortest job first
D
2 level scheduling
       Operating-Systems       Process-Scheduling       UGC NET CS 2008 Dec-Paper-2
Question 31 Explanation: 
→ Round robin and priority scheduling algorithms are preemptive based algorithms.
→ FCFS and SJF is non-preemptive based algorithms but in SJF are supporting another version is SRTF(Shortest remaining time first)
Question 32
An example of a non-preemptive CPU scheduling algorithm is :
A
Shortest job first scheduling.
B
Round robin scheduling.
C
Priority scheduling.
D
Fair share scheduling.
       Operating-Systems       Process-Scheduling       UGC NET CS 2008-june-Paper-2
Question 32 Explanation: 
→ Round robin and priority scheduling algorithms are preemptive based algorithms.
→ FCFS and SJF is non-preemptive based algorithms but in SJF are supporting another version is SRTF(Shortest remaining time first)
Question 33
Consider the following four processes with the arrival time and length of CPU burst given in milliseconds :

The average waiting time for preemptive SJF scheduling algorithm is __________.
A
6.5
B
7.5
C
6.75
D
7.75
       Operating-Systems       Process-Scheduling       UGC NET CS 2017 Nov- paper-3
Question 33 Explanation: 

Question 34
Some of the criteria for calculation of priority of a process are:
a. Processor utilization by an individual process.
b. Weight assigned to a user or group of users.
c. Processor utilization by a user or group of processes In fair share scheduler, priority is calculated based on:
A
only (a) and (b)
B
only (a) and (c)
C
(a), (b) and (c)
D
only (b) and (C)
       Operating-Systems       Process-Scheduling       UGC NET CS 2017 Jan- paper-3
Question 34 Explanation: 
Fair-share scheduling is a scheduling algorithm for computer operating systems in which the CPU usage is equally distributed among system users or groups, as opposed to equal distribution among processes.
There are 34 questions to complete.
PHP Code Snippets Powered By : XYZScripts.com