CSCI3150 - IPC-Synchronization Problem

In this lab, you will see some synchronization problems between processes and learn how to solve them.

You need to do:

  • Understand POSIX semaphore APIs (Section 3) and shared memory APIs (Section 4) before try programs in this lab.

  • There are few programs in this lab, compile them, run them, understand them.

  • Finish exercise.

After that, you should know:

  • What race condition and critical region is.

  • What semaphore and shared memory is.

  • How to use POSIX named semaphores to solve synchronization problem between processes.

All the sample codes can be found at https://github.com/Grace-TL/csci3150-ipc.


Prepared by TANG Lu