Operating System Questions and Answers -
This set of Operating System MCQs will be useful for interview preparations for experienced people.
#1: A system is in the safe state if
a) the system can allocate resources to each process in some order and still avoid a deadlock
b) there exist a safe sequence
c) both (a) and (b)
d) none of the mentioned
a) the system can allocate resources to each process in some order and still avoid a deadlock
b) there exist a safe sequence
c) both (a) and (b)
d) none of the mentioned
#2: Which one of the following is the deadlock avoidance algorithm?
a) banker’s algorithm
b) round-robin algorithm
c) elevator algorithm
d) karn’s algorithm
a) banker’s algorithm
b) round-robin algorithm
c) elevator algorithm
d) karn’s algorithm
#3: A problem encountered in multitasking when a process is perpetually denied necessary resources is called
a) deadlock
b) starvation
c) inversion
d) aging
a) deadlock
b) starvation
c) inversion
d) aging
#4: deadlock avoidance algorithm dynamically examines the __________, to ensure that a circular wait condition can never exist.
a) resource allocation state
b) system storage state
c) operating system
d) resources
a) resource allocation state
b) system storage state
c) operating system
d) resources
#5: A system has 11 magnetic tape drives and 3 processes : P0, P1, and P2. Process P0 requires 10 tape drives, P1 requires 4 and P2 requires 9 tape drives.
Process
P0
P1
P2
Maximum needs (process-wise : P0 through P2 top to bottom)
10
4
6
Currently allocated (process-wise)
5
2
2
Which of the following sequence is a safe sequence ?
a) P0, P1, P2
b) P1, P2, P0
c) P2, P0, P1
d) P1, P0, P2
#6: The request and release of resources are ___________.
a) command line statements
b) interrupts
c) system calls
d) special programs
a) command line statements
b) interrupts
c) system calls
d) special programs
#7: Multithreaded programs are :
a) lesser prone to deadlocks
b) more prone to deadlocks
c) not at all prone to deadlocks
d) None of these
a) lesser prone to deadlocks
b) more prone to deadlocks
c) not at all prone to deadlocks
d) None of these
#8: For non sharable resources like a printer, mutual exclusion :
a) must exist
b) must not exist
c) may exist
d) None of these
a) must exist
b) must not exist
c) may exist
d) None of these
#9: The disadvantage of a process being allocated all its resources before beginning its execution is :
a) Low CPU utilization
b) Low resource utilization
c) Very high resource utilization
d) None of these
a) Low CPU utilization
b) Low resource utilization
c) Very high resource utilization
d) None of these
#10: If we preempt a resource from a process, the process cannot continue with its normal execution and it must be :
a) aborted
b) rolled back
c) terminated
d) queued
a) aborted
b) rolled back
c) terminated
d) queued
Please mention the explanation and not able to understand the question no. 5