Friday, March 14, 2008

Coopertive Processes

Here in the above figure There are two Child Process P1 and Child Process P2 and these child process will share same address space. ( Code & Data)
Cooperative process
Cooperative process is that can affect the other process executing in the system or can get affected by the other process executing in the system. Cooperative process may either directly share the logical address space or it can share the data only from the other files. We can achieve the above phenomena using and creating the light weight process and thread process.

When any process create new light weight process or thread process then these process will the share the same logical address space. Similarly when child process is created with the help of fork system call then these process will share the same logical address space means share the code and data both.

Sharing the logical address space is nice but when these process share data only then the problem of inconsistency arises. Suppose we wants to access the concurrently the data which is shared by the both process then we wants to modify something. We will change it in one process but it will not change in the other process carrying the same data.

There are many cases and conditions when we required the cooperative process.

1. The common information will shared by the cooperative process.
2.The processing task will be divided into the several tasks and these task will performed parallel and that will speed up the computation.
3. User can perform more than one task parallel.
4. In the modular programming the programmer needed to separate the each function with the process. So these processes are needed to provide the modularity.





No comments: