The sections that follow will explore the shared memory system calls and discuss how they were applied to this utility program. The discussion covers the following areas:
Creating and Accessing Shared Memory
Obtaining Information about Shared Memory
Changing Shared Memory Attributes
Attaching Shared Memory
Detaching Shared Memory
Destroying Shared Memory
Shared memory must be created, or it must be located if another process has already created it. The program is given an IPC ID to refer to when it has been created or located. Once you have this IPC ID, it is possible to inquire about the shared memory region attributes and change some of them, such as the ownership and permissions.
Before shared memory can be read from ...