Operating System MCQs with Answers
Practice important Operating System MCQs with answers and explanations.
Chapter: 28
Q741:
What does the Available vector represent in Banker’s Algorithm?
A. Remaining needs
B. Allocated instances
C. Unallocated resources
D. Total maximum resources
Correct Answer:
C
Chapter: 28
Q742:
The Safety Algorithm checks whether a system is in a ________.
A. Deadlock
B. Safe state
C. Unsafe state
D. Partial state
Correct Answer:
B
Chapter: 28
Q743:
In the Safety Algorithm, Work vector is initialized as ________.
A. Max matrix
B. Allocation matrix
C. Available vector
D. Need matrix
Correct Answer:
C
Chapter: 28
Q744:
What must be true for Finish[i] for all i to determine if the system is safe?
A. All Finish[i] = true
B. All Finish[i] = false
C. At least one Finish[i] = true
D. All Finish[i] = undefined
Correct Answer:
A
Chapter: 28
Q745:
What happens if no process can satisfy Finish[i] = false and Need[i] <= Work?
A. Continue checking
B. Go to step 4
C. System is safe
D. Allocate resources immediately
Correct Answer:
B
Chapter: 28
Q746:
If Safety Algorithm finds that all Finish[i] are true, system is ________.
A. Unsafe
B. Deadlocked
C. Safe
D. Blocked
Correct Answer:
C
Chapter: 28
Q747:
In Resource Request Algorithm, if Request[i] > Need[i], what should the system do?
A. Grant the request
B. Raise an error
C. Make a new claim
D. Force release resources
Correct Answer:
B
Chapter: 28
Q748:
In Resource Request Algorithm, if Request[i] > Available, what happens?
A. Allocate resources
B. Wait
C. Raise an error
D. Finish the process
Correct Answer:
B
Chapter: 28
Q749:
After pretending to allocate requested resources, the system must invoke ________ to ensure safety.
A. Banker’s Algorithm
B. Safety Algorithm
C. Deadlock Detector
D. Resource Allocation Graph
Correct Answer:
B
Chapter: 28
Q750:
If Safety Algorithm after allocation returns unsafe, what should happen?
A. Accept request
B. Rollback allocation
C. Raise an error
D. Ignore request
Correct Answer:
B
Chapter: 28
Q751:
In the Banker’s example, how many resource types were there?
A. Two
B. Three
C. Four
D. Five
Correct Answer:
B
Chapter: 28
Q752:
In the example, how many processes (P0 to P4) were present?
A. 3
B. 4
C. 5
D. 6
Correct Answer:
C
Chapter: 28
Q753:
How many instances of resource A were available initially in the example?
A. 10
B. 5
C. 7
D. 3
Correct Answer:
A
Chapter: 28
Q754:
How many instances of resource C were initially available?
A. 5
B. 7
C. 2
D. 3
Correct Answer:
B
Chapter: 28
Q755:
The Need matrix is calculated by subtracting Allocation from ________.
A. Available
B. Max
C. Work
D. Request
Correct Answer:
B
Chapter: 28
Q756:
What is the Safe Sequence found in the example after running the Safety Algorithm?
A. P0, P1, P2, P3, P4
B. P1, P3, P4, P0, P2
C. P1, P2, P0, P3, P4
D. P4, P1, P2, P3, P0
Correct Answer:
B
Chapter: 28
Q757:
If a process requests more resources than declared in Max, the system should ________.
A. Allocate
B. Terminate process
C. Raise an error
D. Wait
Correct Answer:
C
Chapter: 28
Q758:
Banker’s algorithm is used for ________.
A. Deadlock detection
B. Deadlock avoidance
C. Deadlock recovery
D. Deadlock ignoring
Correct Answer:
B
Chapter: 28
Q759:
Banker’s algorithm guarantees that the system will never enter a(n) ________ state.
A. Safe
B. Unsafe
C. Executable
D. Schedulable
Correct Answer:
B
Chapter: 28
Q760:
The order of process termination in a safe state is called ________.
A. Completion order
B. Termination order
C. Execution sequence
D. Safe sequence
Correct Answer:
D