← Operating Systems learning path
Operating Systems · Module 4 of 10

Process synchronisation

Coordinate processes that share data.

📖 Key ideas

  1. A race condition happens when results depend on timing.
  2. The critical section must be accessed by one process at a time.
  3. Tools: mutex locks, semaphores, monitors.
  4. Classic problems: producer-consumer, readers-writers, dining philosophers.
  5. Requirements: mutual exclusion, progress, bounded waiting.
💡 Real-life example: A mutex is the single key to a shared bathroom: only the person holding it can enter.
Race conditionTiming-dependent wrong result
Critical sectionCode accessing shared data
MutexLock for mutual exclusion
SemaphoreCounter-based synchronisation tool