Skip to main content

Operating System MCQs with Answers

Practice important Operating System MCQs with answers and explanations.

Multiple Choice Questions

Q621: wait(mutex); readcount--; if(readcount == 0) signal(wrt); signal(mutex); is the code for ______.
  • A: reader entry
  • B: writer entry
  • C: reader exit
  • D: writer exit
View Answer
C

Q622: In bounded buffer problem, if no empty buffer is available, the producer must ______.
  • A: wait on full
  • B: wait on empty
  • C: signal full
  • D: signal mutex
View Answer
B

Q623: In readers-writers problem, if a writer is writing, readers must ______.
  • A: continue reading
  • B: wait
  • C: signal mutex
  • D: increment readcount
View Answer
B

Q624: Which of the following causes deadlock in Dining Philosophers?
  • A: random access
  • B: picking both chopsticks simultaneously
  • C: picking one chopstick at a time without release
  • D: picking chopstick randomly
View Answer
C

Q625: In Dining Philosophers, what happens if all philosophers pick up left chopstick simultaneously?
  • A: eat together
  • B: starvation
  • C: deadlock
  • D: free chopsticks
View Answer
C

Q626: Semaphores are primarily used for ______.
  • A: memory allocation
  • B: mutual exclusion and synchronization
  • C: data processing
  • D: sorting arrays
View Answer
B

Q627: If a counting semaphore’s C < 0 after wait operation, the process must ______.
  • A: signal S2
  • B: wait S2
  • C: signal S1
  • D: wait S1
View Answer
B

Q628: In bounded buffer problem, 'full' semaphore is incremented when ______.
  • A: item is consumed
  • B: item is produced
  • C: buffer is cleared
  • D: buffer is destroyed
View Answer
B

Q629: Dining philosophers problem is a representation of ______.
  • A: concurrency problems
  • B: memory leaks
  • C: code duplication
  • D: sorting issues
View Answer
A

Q630: The structure ‘do { wait(chopstick[i]); wait(chopstick[(i+1)%5]); eat; signal(chopstick[i]); signal(chopstick[(i+1)%5]); think; }’ belongs to ______.
  • A: Reader process
  • B: Writer process
  • C: Philosopher process
  • D: Producer process
View Answer
C

Test Your Knowledge

Take a timed quiz on Operating System

🚀 Start Quiz Now