![]() We know that to communicate between two or more processes, we use shared memory but before using the shared memory what needs to be done with the system calls, let us see this −Ĭreate the shared memory segment or use an already created shared memory segment (shmget())Īttach the process to the already created shared memory segment (shmat())ĭetach the process from the already attached shared memory segment (shmdt())Ĭontrol operations on the shared memory segment (shmctl()) In this chapter, we will know all about shared memory. ![]() We have seen the IPC techniques of Pipes and Named pipes and now it is time to know the remaining IPC techniques viz., Shared Memory, Message Queues, Semaphores, Signals, and Memory Mapping. Unrelated processes (say one process running in one terminal and another process in another terminal) communication can be performed using Named Pipes or through popular IPC techniques of Shared Memory and Message Queues. Usually, inter-related process communication is performed using Pipes or Named Pipes. As we are already aware, communication can be between related or unrelated processes. To reiterate, each process has its own address space, if any process wants to communicate with some information from its own address space to other processes, then it is only possible with IPC (inter process communication) techniques. However, why do we need to share memory or some other means of communication? Shared memory is a memory shared between two or more processes.
0 Comments
Leave a Reply. |