Inter-Process Communication

by Xiaolan Liu

 

Introduction

  • What & Why
  • Process Interaction

  • Resource Sharing
  • Synchronization
  • Solutions

  • Busy Waiting
  • Sleep & Wake up
  • Problems

    Demonstration

     

     

     

     

     

     

     

    Process Interaction

     

    Resource Sharing

    Processes that share resources on a system can sometimes create problems. Such problems are often hard to detect and remedy. In a multiprogramming system, two processes might try to run at the same time. That could cause the shared resource, such as a shared database, to be inconsistent. To keep shared resource consistent is an important issue. Mutual exclusion is one solution to this problem.

     

    Synchronization


    Synchronization is another important problem in Inter-Process Communication. For instance, two processes, running concurrently, are sharing a bounded buffer. One process is producing items to be placed in the buffer, while another process is consuming the items in the buffer. The producing process must not be allowed to place an item in the buffer unless an empty slot in the buffer exists. Conversely, the consuming process must not be allowed to remove an item from the buffer unless an item exists. This means that a certain sequence of events must not be allowed to happen.