Lecture Notes for Client-Server Interfaces

13 February 2001 - Concurrency


  1. concurrency - what is it

    1. more than one computation being carried out at the same time

    2. coordination among the concurrent computations - none is trivial concurrency (although providing trivial concurrency is non-trivial)

  2. concepts

    1. process - the computation

    2. execution threads - the action

    3. shared resources - inter-computation; intra-computation; explicitly shared resources

    4. real vs virtual concurrency - don't exploit concurrency features; stick to the standards

    5. relations among computations - execution relations; sharing relations

    6. context switching - overhead particularly

  3. concurrency and networking

    1. networking is a naturally concurrent environment - lots of hosts attached

    2. client concurrency is effortless; server concurrency is not

  4. concurrency apis

    1. fork() - create an exact (almost) copy of the calling computation

      1. the fork() return value - pid

      2. if ((pid = fork())) { /* in parent */ } else { /* in child */ }

      3. what else - threads; solaris duplicates threads in the child

    2. exec() and friends

      1. gut and refinish the calling computation - run a new computation

      2. the friends differ in the arguments passed and how they're passed

      3. a successful call doesn't return

  5. io operations

    1. most io operations are blocking - cuts down on concurrency

    2. asynchronous io operations - polling operations

    3. thread safe io operations

    4. multiplexing operations - virtual concurrency


This page last modified on 13 February 2001.