Book Image

Linux Shell Scripting Essentials

Book Image

Linux Shell Scripting Essentials

Overview of this book

Table of Contents (15 chapters)
Linux Shell Scripting Essentials
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Inter-process communication


A process alone can do a certain things, but not everything. It will be a very useful and good resource utilization if two or more processes can communicate with each other in the form of sharing results, sending or receiving messages, and so on. In a Linux or Unix-based operating system, two or more processes can communicate with each other using IPC.

IPC is the technique by which processes communicate with each other and are managed by kernel.

IPC is possible to do by any of the following ways:

  • Named pipes: These allow processes to read from and write into it.

  • Shared memory: This is created by one process and is further available for read from and write to this memory by multiple processes.

  • Message queue: This is a structured and an ordered list of memory segments where processes store or retrieve data in queue fashion.

  • Semaphores: This provides a synchronizing mechanism for processes that are accessing the same resource. It has counters that are used to control...