Twitter Delicious Facebook Digg Stumbleupon Favorites More

Tuesday 6 September 2011

Inter-process communication (IPC)

           
Inter process Communication
If there are two processes executing parallel in an operating system then they may have two types
1. Independent process: Those process who do not affect or affected by another process which is executing in the OS(Operating System). 


2. Co-operating Process: These processes need some communication between them to complete their work.


Since there are lots of processes who communicates with another process due to several reasons like Information sharing, To increase the computation speed. etc..
Co-operating process needs some mechanism which may allow them to make communication with other processes and this mechanism is known as Inter Process Communication(IPC). 
Inter Process Communication is of two types
1. Shared memory System.
2. Message passing System.


Shared memory System:
In Shared memory System two process shares some part of their address space.(since it is not allowed by OS to share address space by two processes hence for shared memory system they(sharing processes) must agree to remove this restriction). This address space is then used by all co-operating process, here programmer has to explicitly develop the code for process in such a way the will not be updating at the same location simultaneously(using semaphore). Operating System dosen't take overhead for these things.


Message passing System:
If two processes are co-operating process then they communicate by message passing system also but message passing can slow the execution since message passes through the kernel. But this type of communication is very helpful in distributed computing environment where there is no common address space for communicating process.

0 comments:

Post a Comment

 
Design by Free WordPress Themes | Bloggerized by Lasantha - Premium Blogger Themes | Blogger Templates