Lecture Notes for Operating Systems Concepts

16 October 2003 - Higher-Level Synchronization


  1. semaphores - universal, but low level, prone to misuse, and hard to debug

  2. alternative synchronization primitives

    1. grouped semaphores

      1. semaphores are shared - could lead to problems; multiple semaphore synchronization

      2. atomic operations over a group of semaphores

    2. events - software interrupts

      1. signal and wait - signal is non-sticky

      2. unix signals - like interrupts

      3. nt dispatcher objects - triggered by many things

  3. monitors - classes with semaphores; java

    1. principles

      1. classes provide shared data via abstract data types

      2. class instances can be corrupted by concurrent access

      3. provide a mutex semaphore used by each public method

    2. condition variables

      1. consider a producer-consumer buffer - what if it's empty or full

      2. continually exit and enter - inefficient and unfair

      3. wait inside (sorta) the monitor

      4. condition variables release exclusive access and queue waiters

    3. discussion

      1. nesting and deadlock

      2. varied semantics for entrance, exit, and waiting

  4. interprocess communication - ipc

    1. messages - arbitrary data shipped from one process to another

    2. mailboxes - buffers for holding messages

    3. message protocols - agreement between sender and receiver about message syntax and semantics

    4. send and receive - synchronous (handshaking) or asynchronous

  5. event ordering - reactive systems

    1. like regular expressions over events

    2. useful for designing and implementing real-time systems


This page last modified on 17 November 2003.