4. Interprocess Communication and SynchronizationΒΆ

It is often necessary for individual processes or threads of a single process to collaborate. For this to be achieved, they need facilities to support communication and coordination (synchronization) so that errors do not occur.

The operating system provides these services to processes and also uses them itself, since it is also a multiprogramming application.

One of the compelling reasons for using threads is that inter-thread communication via shared global memory is very simple and OS provided interprocess communication (IPC) facilities are not needed. However, the threads must use locking mechanisms to coordinate access to the shared memory. We will see that it is not possible for a user level program to correctly implement these locks. Thus it is necessary that the operating system provides synchronization facilities.

Contents: