1SVIPC(7) Linux Programmer's Manual SVIPC(7)
2
3
4
6 sysvipc - System V interprocess communication mechanisms
7
9 System V IPC is the name given to three interprocess communication
10 mechanisms that are widely available on UNIX systems: message queues,
11 semaphore, and shared memory.
12
13 Message queues
14 System V message queues allow data to be exchanged in units called mes‐
15 sages. Each messages can have an associated priority, POSIX message
16 queues provide an alternative API for achieving the same result; see
17 mq_overview(7).
18
19 The System V message queue API consists of the following system calls:
20
21 msgget(2)
22 Create a new message queue or obtain the ID of an existing mes‐
23 sage queue. This call returns an identifier that is used in the
24 remaining APIs.
25
26 msgsnd(2)
27 Add a message to a queue.
28
29 msgrcv(2)
30 Remove a message from a queue.
31
32 msgctl(2)
33 Perform various control operations on a queue, including dele‐
34 tion.
35
36 Semaphore sets
37 System V semaphores allow processes to synchronize their actions. Sys‐
38 tem V semaphores are allocated in groups called sets; each semaphore in
39 a set is a counting semaphore. POSIX semaphores provide an alternative
40 API for achieving the same result; see sem_overview(7).
41
42 The System V semaphore API consists of the following system calls:
43
44 semget(2)
45 Create a new set or obtain the ID of an existing set. This call
46 returns an identifier that is used in the remaining APIs.
47
48 semop(2)
49 Perform operations on the semaphores in a set.
50
51 semctl(2)
52 Perform various control operations on a set, including deletion.
53
54 Shared memory segments
55 System V shared memory allows processes to share a region a memory (a
56 "segment"). POSIX shared memory is an alternative API for achieving
57 the same result; see shm_overview(7).
58
59 The System V shared memory API consists of the following system calls:
60
61 shmget(2)
62 Create a new segment or obtain the ID of an existing segment.
63 This call returns an identifier that is used in the remaining
64 APIs.
65
66 shmat(2)
67 Attach an existing shared memory object into the calling
68 process's address space.
69
70 shmdt(2)
71 Detach a segment from the calling process's address space.
72
73 shmctl(2)
74 Perform various control operations on a segment, including dele‐
75 tion.
76
77 IPC namespaces
78 For a discussion of the interaction of System V IPC objects and IPC
79 namespaces, see ipc_namespaces(7).
80
82 ipcmk(1), ipcrm(1), ipcs(1), lsipc(1), ipc(2), msgctl(2), msgget(2),
83 msgrcv(2), msgsnd(2), semctl(2), semget(2), semop(2), shmat(2), shm‐
84 ctl(2), shmdt(2), shmget(2), ftok(3), ipc_namespaces(7)
85
87 This page is part of release 5.13 of the Linux man-pages project. A
88 description of the project, information about reporting bugs, and the
89 latest version of this page, can be found at
90 https://www.kernel.org/doc/man-pages/.
91
92
93
94Linux 2020-04-11 SVIPC(7)