Semaphore

Semaphore

Dijkstra proposed a new and very significant technique for managing concurrent processes by using the value of a simple integer variable to synchronize the progress of interacting processes. This integer variable is called semaphore. So it is basically a synchronizing tool and is accessed only through two low standard atomic operations, wait and signal designated by P() and V() respectively.

The classical definition of wait and signal are :

  • Wait : decrement the value of its argument S as soon as it would become non-negative.
  • Signal : increment the value of its argument, S as an individual operation.

Contributor's Info

Created:
0Comment
Methods of Inter Process Communication| Pipes | FIFO | Message Queue

Methods of IPC:
I) Pipes:

  • It is simplest of all the IPCs.
  • A pipe enables one way communication between a processes.
  • When process terminates, pipe is removed automatically.

II) FIFO:

  • FIFO Stands for First In First Out.
  • It is also called as Named Pipes.
  • A FIFO enables unidirectional communication between a processes.

III) Message Queue:

  • It is used in implementation of Message Passing IPC.
  • Message Queue will remain, even if the process have existed.
  • It can be unidirectional or bidirectional.

IV) Shared Memory:

  • It includes a memory segment which is shared by two or more processes.
  • When a process creates a memory segment for IPC from its logical address space.
  • Other process can attach that available space for communication.
  • Shared Memory is one of the most simplest & Logical Implementation of IPC.

Contributor's Info

Created:
0Comment