Skip to main content

Operating System MCQs with Answers

Practice important Operating System MCQs with answers and explanations.

Multiple Choice Questions

Q501: Which condition does the critical section problem require to avoid two processes entering simultaneously?
  • A: bounded waiting
  • B: mutual exclusion
  • C: progress
  • D: deadlock
View Answer
B

Q502: In Algorithm 3, when a process exits the critical section, it sets _______.
  • A: flag[i]=true
  • B: turn=j
  • C: flag[i]=false
  • D: choosing[i]=true
View Answer
C

Q503: In Algorithm 3, what happens if both processes attempt to set the ‘turn’ at the same time?
  • A: Only one setting will persist
  • B: System crashes
  • C: Both are allowed
  • D: Both wait indefinitely
View Answer
A

Q504: The Bakery Algorithm mainly solves the critical section problem for how many processes?
  • A: 2
  • B: n
  • C: 1
  • D: 0
View Answer
B

Q505: What does disabling interrupts ensure in a uniprocessor environment?
  • A: Increased delay
  • B: No unexpected modification of shared variables
  • C: Faster network communication
  • D: None of the above
View Answer
B

Q506: Why is disabling interrupts not feasible in a multiprocessing environment?
  • A: It improves efficiency
  • B: It causes time-consuming delays
  • C: It enhances mutual exclusion
  • D: It speeds up memory access
View Answer
B

Q507: Which machine instruction saves the current value, sets it to true, and returns the saved value?
  • A: Swap
  • B: Copy
  • C: TestAndSet
  • D: FetchAndAdd
View Answer
C

Q508: TestAndSet instruction is executed ________.
  • A: randomly
  • B: atomically
  • C: partially
  • D: sequentially without guarantee
View Answer
B

Q509: In the TSL-based solution, what happens after entering the critical section?
  • A: lock remains true
  • B: lock becomes false
  • C: key is set to true
  • D: Swap occurs
View Answer
B

Q510: What is missing in the TSL-based solution despite satisfying mutual exclusion and progress?
  • A: Atomic execution
  • B: Bounded waiting
  • C: Multiprocessing
  • D: Swap function
View Answer
B

Test Your Knowledge

Take a timed quiz on Operating System

🚀 Start Quiz Now