Inter-Process Communicationby Xiaolan Liu |
|
Solutions Problems Demonstration
|
Introduciton
What
is a process?
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.
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.
|