Synchronizing Threads and Processes

   

Tuesday 7 March

 
10:05 - 11:00

Lecture 2

Synchronizing Threads and Processes

 

Marek Biskup

The lecture will give an overview of ways and means of synchronizing threads and processes of a parallel application running on a multi-CPU system.  It is meant for programmers designing multithreaded applications and willing to learn more about general techniques.


It requires basic understanding of multiprogramming computer systems (threads, processes).


Additional knowledge of Java will help in better understanding of the examples.

 

Introduction and Motivation
- Concurrent Programs

- Example: a Concurrent Web Server

- Parallel Execution

- Processes and Threads


Synchronizing Access to Memory

- Example of Memory Corruption

- Critical Section

- Hardware Support - the test-and-set Instruction

 

Means of Synchronization

- Mutexes

- Bounded Buffer Example

- Semaphores

- Monitor Objects

- Java Monitors

- Condition Variables

- Bounded Buffer with Monitor Object and Condition

 

Using Threads

- Java

- Complete Bounded-Buffer example

- C-Language Threads - the pthreads

 

The new Concurrent Java API

 

Interprocess Communication in UNIX