Assignment 5
Assignment 5
Lab-5
Interprocess communication using Shared
Memory
Objective:
To understand and implement shared memory in an operating system environment using C in
Linux. This will involve creating a shared memory segment, writing to it from one process, and
reading from it in another. Once the data is read, the shared memory must be deleted
Overview:
• Shared Memory is a method of inter-process communication (IPC) that allows
multiple processes to access the same memory space, and exchange data using that
shared memory space.
• This assignment will cover creating shared memory segments, reading from shared
memory segments, attaching and detaching shared memory, and deleting shared
memory
Write a Program for:
• Create a shared memory segment
It is mandated that this code is supposed to program only in ‘C-Language' and you are supposed
to execute this code in Ubuntu Terminals or any other terminals, online compiler executions are
not allowed and we will deduct marks if you compile it in the online terminal and submit your
record