The Importance Of Interprocess Communication

1951 Words8 Pages
Interprocess communication What is interprocess communication When processes need to be able to communicate with other processes there has to be in place a well-structured way of communicating without having any interruptions taking place, this is where interprocess communication comes into place. Interprocess communication is also known as IPC. According to Techopedia.com, Inter-process communication (IPC) is a mechanism that allows the exchange of data between processes. By providing a user with a set of programming interfaces, IPC helps a programmer organize the activities among different processes. IPC allows one application to control another application, thereby enabling data sharing without interference. How interprocess communication…show more content…
Binary semaphores only take 2 values which are 0 or 1, and are sometimes easier to actually implement than the counting semaphores. When a resource becomes available, the process that is in charge then set the semaphore to 0 or 1 and basically a binary semaphore is used to acquire locks they are also divided into two methods which are up, down and lock, unlock. Counting semaphores Counting semaphores are used to co-ordinate access to resources and is a nonnegative integer counter. According to (Chibios.org, n.d.) A counting semaphore is a synchronization object that can have an arbitrarily large number of states. The internal state is defined by a signed integer variable, the counter. It has two operations which are wait and signal: • Wait operation basically decreases the counter of the semaphore, which means that a resource has been removed/ deleted. • Signal operation increases the counter of the semaphore, which means that a resource has been added. Up and down…show more content…
Is typically initialized to 1. According to (Rouse, n.d.)A Mutex (mutual exclusion object) is a program object that is created so that multiple program thread can take turns sharing the same resource, such as access to a file. Mutex has two states which are locked and unlocked: • Unlocked means that the critical regions is currently unoccupied therefore calling the thread to freely enter the critical region. When process needs to gain access to the critical they call mutex_lock and is basically set to unlocked when data is no longer required. • Locked means that the thread is being blocked until the thread that is currently in the critical regions is completed and has called the mutex_unlock Basically once a program has been started it will create a Mutex for a resource by requesting it from the system. Any thread that therefore requires that resource must make use of the Mutex to lock the resource, from other threads while it is making use of the resource. If it is locked, a thread that requires that resource is typically put in a queue by the system and once it has become unlocked is then given

    More about The Importance Of Interprocess Communication

      Open Document