💻

Operating System MCQs

1K+ questions with answers

101

Scheduling is done so as to ____________

a increase the throughput
b decrease the throughput
c increase the duration of a specific amount of work
d none of the mentioned
Medium
View Details →
102

What is Turnaround time?

a the total waiting time for a process to finish execution
b the total time spent in the ready queue
c the total time spent in the running queue
d the total time from the completion till the submission of a process
Medium
View Details →
103

Scheduling is done so as to ____________

a increase the turnaround time
b decrease the turnaround time
c keep the turnaround time same
d there is no relation between scheduling and turnaround time
Medium
View Details →
104

What is Waiting time?

a the total time in the blocked and waiting queues
b the total time spent in the ready queue
c the total time spent in the running queue
d the total time from the completion till the submission of a process
Medium
View Details →
105

What is Response time?

a the total time taken from the submission time till the completion time
b the total time taken from the submission time till the first response is produced
c the total time taken from submission time till the response is output
d none of the mentioned
Medium
View Details →
106

Round robin scheduling falls under the category of ____________

a Non-preemptive scheduling
b Preemptive scheduling
c All of the mentioned
d None of the mentioned
Medium
View Details →
107

With round robin scheduling algorithm in a time shared system ____________

a using very large time slices converts it into First come First served scheduling algorithm
b using very small time slices converts it into First come First served scheduling algorithm
c using extremely small time slices increases performance
d using very small time slices converts it into Shortest Job First algorithm
Medium
View Details →
108

The portion of the process scheduler in an operating system that dispatches processes is concerned with ____________

a assigning ready processes to CPU
b assigning ready processes to waiting queue
c assigning running processes to blocked queue
d all of the mentioned
Medium
View Details →
109

Complex scheduling algorithms ____________

a are very appropriate for very large computers
b use minimal resources
c use many resources
d all of the mentioned
Medium
View Details →
110

What is FIFO algorithm?

a first executes the job that came in last in the queue
b first executes the job that came in first in the queue
c first executes the job that needs minimal processor
d first executes the job that has maximum processor needs
Medium
View Details →
111

The strategy of making processes that are logically runnable to be temporarily suspended is called ____________

a Non preemptive scheduling
b Preemptive scheduling
c Shortest job first
d First come First served
Medium
View Details →
112

There are 10 different processes running on a workstation. Idle processes are waiting for an input event in the input queue. Busy processes are scheduled with the Round-Robin time sharing method. Which out of the following quantum times is the best value for small response times, if the processes have a short runtime, e.g. less than 10ms?

a tQ = 15ms
b tQ = 40ms
c tQ = 45ms
d tQ = 50ms
Medium
View Details →
113

Orders are processed in the sequence they arrive if _______ rule sequences the jobs.

a earliest due date
b slack time remaining
c first come, first served
d critical ratio
Medium
View Details →
114

Which of the following algorithms tends to minimize the process flow time?

a First come First served
b Shortest Job First
c Earliest Deadline First
d Longest Job First
Medium
View Details →
115

Under multiprogramming, turnaround time for short jobs is usually ________ and that for long jobs is slightly ___________

a Lengthened; Shortened
b Shortened; Lengthened
c Shortened; Shortened
d Shortened; Unchanged
Medium
View Details →
116

Which of the following statements are true? (GATE 2010) 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

a I only
b I and III only
c II and III only
d I, II and III
Medium
View Details →
117

Which is the most optimal scheduling algorithm?

a FCFS – First come First served
b SJF – Shortest Job First
c RR – Round Robin
d None of the mentioned
Medium
View Details →
118

The real difficulty with SJF in short term scheduling is ____________

a it is too good an algorithm
b knowing the length of the next CPU request
c it is too complex to understand
d none of the mentioned
Medium
View Details →
119

The FCFS algorithm is particularly troublesome for ____________

a time sharing systems
b multiprogramming systems
c multiprocessor systems
d operating systems
Medium
View Details →
120

Consider the following set of processes, the length of the CPU burst time given in milliseconds. Process P1 P2 P3 P4 Burst time 6 8 7 3

a The waiting time for process P1 is 3ms
b The waiting time for process P1 is 0ms
c The waiting time for process P1 is 16ms
d The waiting time for process P1 is 9ms
Medium
View Details →
121

Preemptive Shortest Job First scheduling is sometimes called ____________

a Fast SJF scheduling
b EDF scheduling – Earliest Deadline First
c HRRN scheduling – Highest Response Ratio Next
d SRTN scheduling – Shortest Remaining Time Next
Medium
View Details →
122

An SJF algorithm is simply a priority algorithm where the priority is ____________

a the predicted next CPU burst
b the inverse of the predicted next CPU burst
c the current CPU burst
d anything the user wants
Medium
View Details →
123

What is ‘Aging’?

a keeping track of cache contents
b keeping track of what pages are currently residing in memory
c keeping track of how many times a given page is referenced
d increasing the priority of jobs to ensure termination in a finite time
Medium
View Details →
124

A solution to the problem of indefinite blockage of low – priority processes is ____________

a Starvation
b Wait queue
c Ready queue
d Aging
Medium
View Details →
125

Which of the following statements are true? (GATE 2010) 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

a i only
b i and iii only
c ii and iii only
d i, ii and iii
Medium
View Details →
126

Which of the following scheduling algorithms gives minimum average waiting time?

a FCFS
b SJF
c Round – robin
d Priority
Medium
View Details →
127

Concurrent access to shared data may result in ____________

a data consistency
b data insecurity
c data inconsistency
d none of the mentioned
Medium
View Details →
128

A situation where several processes access and manipulate the same data concurrently and the outcome of the execution depends on the particular order in which access takes place is called ____________

a data consistency
b race condition
c aging
d starvation
Medium
View Details →
129

The segment of code in which the process may change common variables, update tables, write into files is known as ____________

a program
b critical section
c non – critical section
d synchronizing
Medium
View Details →
130

Which of the following conditions must be satisfied to solve the critical section problem?

a Mutual Exclusion
b Progress
c Bounded Waiting
d All of the mentioned
Medium
View Details →
131

Mutual exclusion implies that ____________

a if a process is executing in its critical section, then no other process must be executing in their critical sections
b if a process is executing in its critical section, then other processes must be executing in their critical sections
c if a process is executing in its critical section, then all the resources of the system must be blocked until it finishes execution
d none of the mentioned
Medium
View Details →
132

Bounded waiting implies that there exists a bound on the number of times a process is allowed to enter its critical section ____________

a after a process has made a request to enter its critical section and before the request is granted
b when another process is in its critical section
c before a process has made a request to enter its critical section
d none of the mentioned
Medium
View Details →
133

In the bakery algorithm to solve the critical section problem ____________

a each process is put into a queue and picked up in an ordered manner
b each process receives a number (may or may not be unique) and the one with the lowest number is served next
c each process gets a unique number and the one with the highest number is served next
d each process gets a unique number and the one with the lowest number is served next
Medium
View Details →
134

An un-interruptible unit is known as ____________

a single
b atomic
c static
d none of the mentioned
Medium
View Details →
135

TestAndSet instruction is executed ____________

a after a particular process
b periodically
c atomically
d none of the mentioned
Medium
View Details →
136

Semaphore is a/an _______ to solve the critical section problem.

a hardware for a system
b special program for a system
c integer variable
d none of the mentioned
Medium
View Details →
137

What are the two atomic operations permissible on semaphores?

a wait and signal
b stop and wait
c hold and signal
d none of the mentioned
Medium
View Details →
138

What are Spinlocks?

a CPU cycles wasting locks over critical sections of programs
b Locks that avoid time wastage in context switches
c Locks that work better on multiprocessor systems
d All of the mentioned
Medium
View Details →
139

What is the main disadvantage of spinlocks?

a they are not sufficient for many process
b they require busy waiting
c they are unreliable sometimes
d they are too complex for programmers
Medium
View Details →
140

The signal operation of the semaphore basically works on the basic _______ system call.

a continue()
b wakeup()
c getup()
d start()
Medium
View Details →
141

If the semaphore value is negative ____________

a its magnitude is the number of processes waiting on that semaphore
b it is invalid
c no operation can be further performed on it until the signal operation is performed on it
d none of the mentioned
Medium
View Details →
142

The code that changes the value of the semaphore is ____________

a remainder section code
b non – critical section code
c critical section code
d none of the mentioned
Medium
View Details →
143

The following program consists of 3 concurrent processes and 3 binary semaphores. The semaphores are initialized as S0 = 1, S1 = 0, S2 = 0. Process P0 while(true) { wait(S0); print '0'; release(S1); release(S2); } Process P1 wait(S1); release(S0); Process P2 wait(S2); release(S0);

a At least twice
b Exactly twice
c Exactly thrice
d Exactly once
Medium
View Details →
144

Two processes, P1 and P2, need to access a critical section of code. Consider the following synchronization construct used by the processes. Process P1 : while(true) { w1 = true; while(w2 == true); Critical section w1 = false; } Remainder Section Process P2 : while(true) { w2 = true; while(w1 == true); Critical section w2 = false; } Remainder Section

a It does not ensure mutual exclusion
b It does not ensure bounded waiting
c It requires that processes enter the critical section in strict alternation
d It does not prevent deadlocks but ensures mutual exclusion
Medium
View Details →
145

What will happen if a non-recursive mutex is locked more than once?

a Starvation
b Deadlock
c Aging
d Signaling
Medium
View Details →
146

What is a semaphore?

a is a binary mutex
b must be accessed from only one process
c can be accessed from multiple processes
d none of the mentioned
Medium
View Details →
147

What are the two kinds of semaphores?

a mutex & counting
b binary & counting
c counting & decimal
d decimal & binary
Medium
View Details →
148

What is a mutex?

a is a binary mutex
b must be accessed from only one process
c can be accessed from multiple processes
d none of the mentioned
Medium
View Details →
149

At a particular time of computation the value of a counting semaphore is 7.Then 20 P operations and 15 V operations were completed on this semaphore. The resulting value of the semaphore is? (GATE 1987)

a 42
b 2
c 7
d 12
Medium
View Details →
150

A binary semaphore is a semaphore with integer values ____________

a 1
b -1
c 0.8
d 0.5
Medium
View Details →