← Operating Systems learning pathOperating Systems · Module 4 of 10
Process synchronisation
Coordinate processes that share data.
📖 Key ideas
- A race condition happens when results depend on timing.
- The critical section must be accessed by one process at a time.
- Tools: mutex locks, semaphores, monitors.
- Classic problems: producer-consumer, readers-writers, dining philosophers.
- 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