Inter-Process Communication

by Xiaolan Liu

 

 

Introduction

  • What & Why
  • Process Interaction

  • Resource Sharing
  • Synchronization
  • Solutions

    Problems

    Demonstration

     

     

     

     

     

     

     

    Introduciton

    What is a process?
    and
    Why do processes need to communicate?

    What is a process?

    A process can be thought of as a program in execution. In order to accomplish its task, a process needs resources - such as CPU time, memory, files, and I/O devices. These resources are allocated either when the process is created or while it is executing. A process is the unit of work in most systems. Such a system consists of a collection of processes: Operating-system processes execute system code, and user processes execute user code. All these processes can potentially execute concurrently.


    It is important to distincte a process and a program . A process is not just a program. For instance, a same program can be run by several people on an operating system, but each has a separate process. The part of a computer which performs the action of running a program is called a processor. Modern computers can often run many processes at once. True parallelism is possible if a computer system has more than one processor. In this case, processes may share common resources, such as a printer, files, memory, and registers.

    Why do processes need to interact?

    There are several reasons for providing an environment that allows processes to communicate to one another. They are informaiton sharing, computation speedup, modularity, and convenience. Inter-process communication is one way to achieve these effect. It provides a mechanism to allow processes to communicate and to synchronize their actions without sharing the same address space. In certain condition, the processes must communicate because the state of one process may depend on the other. This means that the first process must run before the second process can begin. In other words, the second process must block until the first process' output is available.