Operating System MCQs with Answers
Practice important Operating System MCQs with answers and explanations.
Chapter: 19
Q461:
What does the mutual exclusion condition ensure in process synchronization?
A. Only one process can be in its critical section at any time
B. No process can enter its critical section
C. All processes enter their critical sections at the same time
D. All processes execute in parallel
Correct Answer:
A
Chapter: 19
Q462:
What is the bounded waiting condition in process synchronization?
A. A process is allowed to enter the critical section after a fixed number of processes
B. A process can enter the critical section any number of times
C. A process can enter the critical section after waiting indefinitely
D. A process can enter the critical section within a fixed time bound
Correct Answer:
D
Chapter: 19
Q463:
Which solution to the critical section problem requires atomic operations?
A. Software-based solutions
B. Hardware-based solutions
C. Operating system-based solutions
D. All of the above
Correct Answer:
B
Chapter: 19
Q464:
In process synchronization, the entry section refers to which of the following?
A. Code that prepares the process to enter the critical section
B. Code that executes after the process enters the critical section
C. Code that exits the critical section
D. Code that manages the shared resource
Correct Answer:
A
Chapter: 19
Q465:
What happens if the critical section problem is not solved?
A. Processes may enter their critical sections simultaneously, causing data inconsistency
B. Processes will be unable to access shared data
C. The system will become deadlocked
D. None of the above
Correct Answer:
A
Chapter: 19
Q466:
In the solution to the critical section problem, what happens after a process exits its critical section?
A. It moves to the remainder section
B. It is immediately scheduled for the next critical section
C. It is terminated
D. It waits for the next available resource
Correct Answer:
A
Chapter: 19
Q467:
The value of 'counter' after the concurrent execution of counter++ and counter-- with initial value 5 can be ____.
A. 4
B. 5
C. 6
D. 7
Correct Answer:
A
Chapter: 19
Q468:
In process synchronization, the code that prepares a process to enter its critical section is called the ____ section.
A. Entry
B. Critical
C. Exit
D. Remainder
Correct Answer:
A
Chapter: 19
Q469:
The technique used to ensure that only one process is in its critical section at a time is called ____.
A. Mutual Exclusion
B. Synchronization
C. Deadlock Prevention
D. Race Condition
Correct Answer:
A
Chapter: 19
Q470:
In Algorithm 1, the shared variable 'turn' is used to determine which process can execute in the ____ section.
A. Critical
B. Entry
C. Exit
D. Remainder
Correct Answer:
A
Chapter: 19
Q471:
In process synchronization, the condition that guarantees that no process is forced to wait indefinitely to enter its critical section is called ____.
A. Bounded Waiting
B. Mutual Exclusion
C. Progress
D. Atomicity
Correct Answer:
A
Chapter: 19
Q472:
The solution to the critical section problem must satisfy three requirements: Mutual Exclusion, Progress, and ____.
A. Bounded Waiting
B. Atomicity
C. Deadlock
D. Synchronization
Correct Answer:
A
Chapter: 19
Q473:
If both processes attempt to access the critical section simultaneously, the system may suffer from a ____.
A. Race Condition
B. Deadlock
C. Memory Leak
D. Buffer Overflow
Correct Answer:
A
Chapter: 19
Q474:
The mutual exclusion condition ensures that only ____ process can access the critical section at any time.
A. One
B. Multiple
C. No
D. All
Correct Answer:
A
Chapter: 19
Q475:
The critical section problem arises when multiple processes access shared data concurrently without ____.
A. Synchronization
B. Deadlock
C. Progress
D. Race Condition
Correct Answer:
A
Chapter: 20
Q476:
What is the main problem with the two earlier solutions of the 2-process critical section?
A. They used too much memory
B. They did not satisfy the progress condition
C. They were too slow
D. They satisfied only bounded wait
Correct Answer:
B
Chapter: 20
Q477:
In Algorithm 3, what is the purpose of the variable 'flag[i]'?
A. To indicate if process is ready to leave
B. To indicate if process wants to enter critical section
C. To assign process ID
D. To maintain ticket numbers
Correct Answer:
B
Chapter: 20
Q478:
What value is initially assigned to the 'flag' array in Algorithm 3?
A. 1
B. 1
Correct Answer:
C
Chapter: 20
Q479:
In Algorithm 3, what variable decides which process gets to enter the critical section?
A. flag
B. i
C. j
D. turn
Correct Answer:
D
Chapter: 20
Q480:
In Algorithm 3, what is the effect if both processes set 'turn' simultaneously?
A. Both can enter critical section
B. One assignment will overwrite the other
C. Both assignments remain
D. The system crashes
Correct Answer:
B