COSC240 • Operating Systems

Week 4: Concurrency & Mutual Exclusion

Confront race conditions on shared memory. Master critical sections, software synchronization, hardware atomic primitives, and semaphores.

📚 What You Will Learn
  • Core architectural mechanics and low-level data structures.
  • Kernel operational states, hardware interrupts, and protection boundaries.
  • Theoretical trade-offs, performance implications, and industry standards.
✅ What You Should Do
  • Review lecture notes and assigned textbook chapters.
  • Explore interactive pedagogical steppers and simulation modules.
  • Complete weekly tutorials, practical lab assignments, and review quizzes.
📂 Course Modules & Deep-Dive Texts
Module 01

Race Conditions & Critical Regions

Define critical sections, mutual exclusion requirements, race conditions, and progress invariants.

Critical SectionRace ConditionMutual ExclusionProgress
Module Overview →
Module 02

Hardware Primitives & Spinlocks

Analyze disable interrupts, Test-And-Set (TAS), Compare-And-Swap (CAS), and busy-waiting spinlocks.

TASCASSpinlocksAtomic Instructions
Module Overview →
Module 03

Semaphores, Mutexes & Monitors

Master Dijkstra counting semaphores, binary mutexes, condition variables, and language-level monitors.

SemaphoresMutexesMonitorsCondition Variables
Module Overview →
Module 04

Classical Synchronization Problems

Solve Producer-Consumer, Readers-Writers, and Dining Philosophers concurrency challenges.

Producer-ConsumerReaders-WritersBounded BufferSynchronization
Module Overview →