🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← All topics

Quiz: Process Synchronization: questions with answers

10 questions, each with the answer and a short explanation.

Take the timed quiz + get a certificate →
  1. Q1. Two threads update a shared counter and one update is lost. This is a:
  2. Q2. Which is NOT a requirement of a critical-section solution?
  3. Q3. A counting semaphore initialised to 3 controls access to:
  4. Q4. What does signal(S) do?
  5. Q5. Key difference between a mutex and a semaphore?
  6. Q6. A semaphore S starts at 2. Three processes call wait(S) one after another, and nobody calls signal(S). What happens?
  7. Q7. In the producer–consumer solution, when does the producer block on wait(empty)?
  8. Q8. In the readers–writers problem, which access pattern is allowed?
  9. Q9. In the dining philosophers problem, how does making one philosopher pick up the right fork first prevent deadlock?
  10. Q10. Why is it a bad idea to hold a lock while doing slow I/O such as reading a file?