Operating System MCQs with Answers
Practice important Operating System MCQs with answers and explanations.
Chapter: 29
Q781:
If P2 requests one more instance of C, what happens to the system?
A. It recovers automatically
B. Deadlock occurs
C. It allocates more memory
D. It resets processes
Correct Answer:
B
Chapter: 29
Q782:
What processes are deadlocked if P2 requests an extra C?
A. P0 only
B. P0, P1, P2, P3
C. P1, P2, P3, P4
D. P2, P3, P4 only
Correct Answer:
C
Chapter: 29
Q783:
When should deadlock detection algorithm be invoked?
A. After every resource request
B. Periodically or based on CPU utilization
C. After system reboot
D. After program compilation
Correct Answer:
B
Chapter: 29
Q784:
Which method is NOT used to recover from a deadlock?
A. Process Termination
B. Resource Preemption
C. Resource Augmentation
D. Waiting forever
Correct Answer:
D
Chapter: 29
Q785:
One way to recover from a deadlock is to ______.
A. Allocate more resources
B. Abort deadlocked processes
C. Increase CPU speed
D. Decrease memory size
Correct Answer:
B
Chapter: 29
Q786:
In process termination, which strategy is NOT typically used?
A. Abort all deadlocked processes
B. Abort one process at a time
C. Abort only running processes
D. Abort processes one by one to break the cycle
Correct Answer:
C
Chapter: 29
Q787:
Deadlock is guaranteed to occur if ______.
A. All processes are preempted
B. Circular wait exists
C. Resources are allocated carefully
D. CPU utilization is low
Correct Answer:
B
Chapter: 29
Q788:
In deadlock detection, if Request[i] > Work for all i, what does it indicate?
A. No deadlock
B. All processes can complete
C. Potential deadlock
D. All resources are available
Correct Answer:
C
Chapter: 29
Q789:
What does Allocation[i][j] represent?
A. Number of free resources Rj
B. Number of resources Rj allocated to process Pi
C. Number of processes waiting for Rj
D. Number of instances of Pi
Correct Answer:
B
Chapter: 29
Q790:
Which of the following best describes Available vector?
A. Number of allocated resources
B. Number of free instances of each resource type
C. Number of deadlocked resources
D. Number of completed processes
Correct Answer:
B
Chapter: 29
Q791:
If a system has multiple cycles in the resource graph, what does it mean?
A. Single deadlock
B. No deadlock
C. Multiple possible deadlocks
D. Safe state
Correct Answer:
C
Chapter: 29
Q792:
In the example, how many resources of type A were available initially?
A. 7
B. 2
C. 6
Correct Answer:
A
Chapter: 29
Q793:
Which process had 0 allocation of A, B, and C initially?
A. P0
B. P1
C. P2
D. P4
Correct Answer:
A
Chapter: 29
Q794:
In the sequence <P0, P2, P3, P4, P1>, which process completes last?
A. P0
B. P1
C. P2
D. P3
Correct Answer:
B
Chapter: 29
Q795:
Which field in the deadlock detection algorithm is updated during step 3?
A. Finish[i]
B. Request[i]
C. Available[i]
D. Wait[i]
Correct Answer:
A
Chapter: 29
Q796:
If Request[i] is 0 for all resources, what can you conclude?
A. Process is waiting
B. Process is finished
C. Process is deadlocked
D. Process is holding resources
Correct Answer:
B
Chapter: 29
Q797:
In the example, what resource was requested more by P1?
A. A
B. B
C. C
D. Both A and C
Correct Answer:
D
Chapter: 29
Q798:
What should the system do if a deadlock is detected?
A. Abort some processes
B. Wait until resources are free
C. Ignore it
D. Shut down immediately
Correct Answer:
A
Chapter: 29
Q799:
The matrix showing currently allocated resources to each process is called ______.
A. Request matrix
B. Allocation matrix
C. Finish matrix
D. Work matrix
Correct Answer:
B
Chapter: 30
Q800:
What is the main purpose of memory management in a system?
A. Ensure fair, secure, and efficient use of memory
B. Manage CPU instructions
C. Handle process scheduling
D. Perform binary code execution
Correct Answer:
A