- semaphores - universal, but low level, prone to misuse, and hard to debug
- alternative synchronization primitives
- grouped semaphores
- semaphores are shared - could lead to problems; multiple semaphore
synchronization
- atomic operations over a group of semaphores
- events - software interrupts
- signal and wait - signal is non-sticky
- unix signals - like interrupts
- nt dispatcher objects - triggered by many things
- monitors - classes with semaphores; java
- principles
- classes provide shared data via abstract data types
- class instances can be corrupted by concurrent access
- provide a mutex semaphore used by each public method
- condition variables
- consider a producer-consumer buffer - what if it's empty or full
- continually exit and enter - inefficient and unfair
- wait inside (sorta) the monitor
- condition variables release exclusive access and queue waiters
- discussion
- nesting and deadlock
- varied semantics for entrance, exit, and waiting
- interprocess communication - ipc
- messages - arbitrary data shipped from one process to another
- mailboxes - buffers for holding messages
- message protocols - agreement between sender and receiver about message
syntax and semantics
- send and receive - synchronous (handshaking) or asynchronous
- event ordering - reactive systems
- like regular expressions over events
- useful for designing and implementing real-time systems
This page last modified on 17 November 2003.