ABSTRACT

Inter-program communication (referred to as inter-process communication because a program in execution is called a process) is highly useful especially in system software and OS development. The easiest way to have two programs exchange data when they both are in execution is to use flat data files. Flat files can be used to store data and read data by both the programs one after the other, but the disk operations are much slower compared to operations in the RAM. Therefore, it becomes necessary to exchange data using the RAM that would be much quicker compared to disk files. But as the computer builds protective boundaries around the RAM allocated to programs in execution, it is impossible for one program to directly access the RAM allocated to another program. The OS provides the mechanisms of shared memory, semaphores, message queues, and message passing to facilitate inter-program communication through the RAM. All these techniques are introduced in this chapter.