Question: Interprocess communication using shared memory requires communicating processes to establish a region of shared memory. For this exercise, you will create producer and consumer processes.
Interprocess communication using shared memory requires communicating processes to establish a region of shared memory. For this exercise, you will create producer and consumer processes. The producer will write to the shared memory region and the consumer will print the contents of the shared memory region. Working source code has been provided for both the producer and consumer. click Follow links and create projects for producer and consumer, respectively. Load the respective source code into each project and compile/link to create producer and consumer executables. Study the code and research each system call to ensure you understand. Run the producer and then run the consumer.
a) What did you observe? How did the consumer get access to the producers process space?
click for producer ----> https://drive.google.com/file/d/1GTdNB3_OoXYFIKb1IR3G_jcxokxEUHK5/view
click for consumer ----> https://drive.google.com/file/d/1iazcfOggtrrMxn49-I5N1YIieZ3YAUUY/view
b) How has the output of the consumer changed
c) Finally, what if the consumer also wanted to WRITE to the shared memory region; What would have to change in the consumer/producer?
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
