Warning

This portion of the book is under construction, not ready to be read

31. Introduction to Concurrency, Synchronization and Deadlock#

One of the key responsibilities of an operating system is that of synchronization—handling concurrent events in a reasonable way, and providing mechanisms for user applications to do so as well.

  1. interprocess communication and need to share

    • system calls to enable: shared memory region, shmat, (reference back pipes)

    • short statement we have parallel hardware, lots of cores…

    • leads to threads from the perspective of we want work on same data…

  2. locking

  3. deadlock

  4. challenge modern hardware

    • NUMA, caches…

    • sequential consistency, processor consistency… C++11 memory model (possible part 4)

    • scalability, lock granularity

  5. locking in linux