Question: A 1 2 - Implement communication between two different processes using SHM Pre - requisites: - Knowledge about system calls, How to read and understand

A12- Implement communication between two different processes using SHM
Pre-requisites:-
Knowledge about system calls, How to read and understand man pages.
Good knowledge about Shared memory
Objective:
To understand how to establish communication between 2 different process.
Requirements:
Create 2 different process by executing 2 different a.out (executable) files
Create SHM from any of the process. Either Process 1 or Process 2
In process 1
Prompt the user to enter a string
Convert the string into Upper case
Write the Upper case string in shared memory
4.In process 2
Read the data from the shared memory
Reverse input which is read from SHM
Write the Reverse string in shared memory
5.Read the data from shared memory in process 1
6.Print the output string on stdout
Sample output :
Run the two process executable in two different tabs
1../Process1
Enter the string: Hello
Writing to shared memory ......
Reading from shared memory: OLLEH
2../Process 2
Reading from shared memory :olleh
Writing to Shared memory ... please give the c program for this requirement the string entered by the user must be taken and this output must come.please help.Previously the code u gave me is not working proprely because this opertion is not only hello string and any string the user enters it shld be giving the approperiate output

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!