EmbLogic's Blog

Shared Memory

Shared memory allows two or more processes to share the same region (segment) of physical memory”

“One processes simply write data to the shared memory region, which will available to all other processes attached to that region & any of the attached process can read that data”

“Shared memory is the fastest IPC mechanism, because in this no kernel intervention is required”

“Kernel creates a memory region in user space using shmget() call, which will be available in a single page or in multiple pages”

“Then kernel add that shared memory (pages) to the page tables( to virtual address sapce) of all the processes, those want to share that page using shmat() call

“The attached shared memory segment can be detached using shmdt() call in the calling process”

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>