CSE 513 · GEBZE TECHNICAL UNIVERSITY
Concurrency and synchronization
Lecture set 03 · Semester week 3
The central question
How can concurrent activities cooperate without corrupting shared state?
First half
Race conditions, interleavings, critical sections, atomic operations and mutexes.
Second half
Semaphores, condition variables and monitors; producer–consumer and dining philosophers.
What you should be able to do
- Trace an interleaving that causes a race condition.
- Explain how synchronization controls access to shared state.
A concrete example
Trace two threads updating a shared counter, then examine a synchronized version.
Reading reference
Operating System Concepts, 10th edition: Chapters 6–7. We use selected sections rather than every slide in each chapter.
Official textbook slidesLecture materials
Read the Week 3 chapter with classroom analogies, worked interleavings and optional C practice.
Read Concurrency and synchronization →