Skip to main content

Operating System MCQs with Answers

Practice important Operating System MCQs with answers and explanations.

Chapter: 28
Q761:
The system is in safe state if:
A. There is a cycle
B. No safe sequence exists
C. Safe sequence exists
D. Resources are over-allocated
Correct Answer: C
Chapter: 28
Q762:
If Available[j] = 3, it means there are ________ available instances of resource Rj.
A. 2
B. 3
C. 4
D. 5
Correct Answer: B
Chapter: 28
Q763:
If Need[i][j] = 0 for all j, the process ________.
A. Still needs resources
B. Has finished execution
C. Is waiting
D. Cannot finish
Correct Answer: B
Chapter: 28
Q764:
When Pi requests Rj, the claim edge Pi → Rj is converted to ________.
A. Assignment edge
B. Request edge
C. Release edge
D. Max edge
Correct Answer: B
Chapter: 28
Q765:
What represents the current allocation of resources in Banker’s Algorithm?
A. Max matrix
B. Available vector
C. Allocation matrix
D. Need matrix
Correct Answer: C
Chapter: 28
Q766:
The safe sequence < P1, P3, P4, P0 > ensures that:
A. Deadlock occurs
B. Resources are wasted
C. All processes finish
D. Unsafe state is reached
Correct Answer: C
Chapter: 28
Q767:
Process P1 requests (1,0,2) resources. The system must first check against ________.
A. Allocation
B. Available
C. Need
D. Max
Correct Answer: B
Chapter: 29
Q768:
What is the purpose of a deadlock detection algorithm?
A. To allocate resources
B. To detect deadlocks in the system
C. To prevent deadlocks
D. To increase resource usage
Correct Answer: B
Chapter: 29
Q769:
In a wait-for graph, an edge from Pi to Pj means ______.
A. Pi is executing Pj
B. Pi is waiting for Pj to release a resource
C. Pj is waiting for Pi to release a resource
D. Pj is executing Pi
Correct Answer: B
Chapter: 29
Q770:
In a wait-for graph, a deadlock exists if and only if ______.
A. All processes are finished
B. No process is waiting
C. The graph contains a cycle
D. Resources are free
Correct Answer: C
Chapter: 29
Q771:
A system must provide _______ when deadlocks are possible.
A. Deadlock avoidance only
B. A deadlock detection and recovery scheme
C. Only resource preemption
D. Only process creation
Correct Answer: B
Chapter: 29
Q772:
What does a wait-for graph remove compared to a resource allocation graph?
A. Resource nodes
B. Process nodes
C. Edges
D. Cycles
Correct Answer: A
Chapter: 29
Q773:
If the wait-for graph contains no cycle, then the system is _______.
A. In deadlock
B. Safe
C. Unsafe
D. Recovering
Correct Answer: B
Chapter: 29
Q774:
The deadlock detection algorithm for multiple resource instances uses which data structures?
A. Stack, Queue
B. Available, Allocation, Request matrices
C. Tree, Linked list
D. Graph, Set
Correct Answer: B
Chapter: 29
Q775:
In the deadlock detection algorithm, the Work vector is initialized to ______.
A. Request
B. Allocation
C. Available
D. Finish
Correct Answer: C
Chapter: 29
Q776:
In the deadlock detection algorithm, Finish[i] is set to true if ______.
A. Allocation[i] is not zero
B. Allocation[i] is zero
C. Request[i] is greater than Work
D. Request[i] is less than Work
Correct Answer: B
Chapter: 29
Q777:
When Finish[i] is false after algorithm execution, it means ______.
A. Process Pi has completed
B. Process Pi is deadlocked
C. Process Pi is running
D. Process Pi has preempted resources
Correct Answer: B
Chapter: 29
Q778:
The system will be in a deadlock state if ______.
A. Work is greater than Request
B. Finish[i] == false for some i
C. Finish[i] == true for all i
D. Allocation matrix is empty
Correct Answer: B
Chapter: 29
Q779:
In deadlock detection, what happens if no index i satisfies Finish[i] == false and Requesti ≤ Work?
A. System is safe
B. Go to step 4 (check for deadlock)
C. Allocate more resources
D. Abort all processes
Correct Answer: B
Chapter: 29
Q780:
In the provided example, what was the Finish Sequence initially found?
A. <P0>
B. <P0, P2>
C. <P0, P2, P3>
D. <P0, P2, P3, P4, P1>
Correct Answer: A

Test Your Knowledge

Take a timed quiz on Operating System

🚀 Start Quiz Now