Skip to Content
Understanding the Linux Kernel, Second Edition
book

Understanding the Linux Kernel, Second Edition

by Daniel P. Bovet, Marco Cesati
December 2002
Intermediate to advanced
784 pages
27h 7m
English
O'Reilly Media, Inc.
Content preview from Understanding the Linux Kernel, Second Edition

System V IPC

IPC is an abbreviation for Interprocess Communication, and commonly refers to a set of mechanisms that allow a User Mode process to do the following:

  • Synchronize itself with other processes by means of semaphores

  • Send messages to other processes or receive messages from them

  • Share a memory area with other processes

System V IPC first appeared in a development Unix variant called "Columbus Unix” and later was adopted by AT&T’s System III. It is now found in most Unix systems, including Linux.

IPC data structures are created dynamically when a process requests an IPC resource (a semaphore, a message queue, or a shared memory region). An IPC resource is persistent: unless explicitly removed by a process, it is kept in memory and remains available until the system is shut down. An IPC resource may be used by any process, including those that do not share the ancestor that created the resource.

Since a process may require several IPC resources of the same type, each new resource is identified by a 32-bit IPC key , which is similar to the file pathname in the system’s directory tree. Each IPC resource also has a 32-bit IPC identifier , which is somewhat similar to the file descriptor associated with an open file. IPC identifiers are assigned to IPC resources by the kernel and are unique within the system, while IPC keys can be freely chosen by programmers.

When two or more processes wish to communicate through an IPC resource, they all refer to the IPC identifier of the ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Understanding the Linux Kernel, 3rd Edition

Understanding the Linux Kernel, 3rd Edition

Daniel P. Bovet, Marco Cesati
Understanding the Linux Kernel

Understanding the Linux Kernel

Daniel P. Bovet, Marco Cesati
Linux Kernel Programming

Linux Kernel Programming

Kaiwan N. Billimoria

Publisher Resources

ISBN: 0596002130Catalog PageErrata