Computer Science 330
Operating Systems
Fall 2020, Siena College
Lecture 0x08: Semaphores
Date: Monday, September 21, 2020
Agenda
- Announcements
- The next readings/activities from OS zyBook: Chapter 5, due Monday, September 28
- Programming Project 2: CPU Scheduler Simulation [HTML] [PDF] coding due Thursday, writeup Monday
- Looking ahead to the midterm exam
- during class on Friday, October 2, in person (if possible)
- covers up to OS zyBook Chapter 4, Lab 5, Programming Project 2
- open book, notes (yours or mine), examples, your own graded or
ungraded work, no other sources permitted
- some practice questions coming soon
- Programming Project 1: A Process Tree [HTML] [PDF] quick recap
- In-class exercise: how to find the list of interleavings for the
counter++ and counter- in the producer and consumer
- Semaphores
- abstract synchronization primitive
- wait/signal semantics
- using to solve the critical section problem
- implementation idea
- POSIX semaphores
- pthreads mutexes
- using as a general synchronization tool
- Classical problems of synchronization
- Bounded Buffer with no busy waits
- Lab 5: Concurrency [HTML] [PDF]
Examples
Links