Question: write two versions (pipe version and shared memory version) of an interprocess communication program (A8p2_pipe.c, A8p2_shm.c or A8p2_pipe.cpp A8p2_shm.cpp) in C or C+t. Each version

 write two versions (pipe version and shared memory version) of an

write two versions (pipe version and shared memory version) of an interprocess communication program (A8p2_pipe.c, A8p2_shm.c or A8p2_pipe.cpp A8p2_shm.cpp) in C or C+t. Each version should create two processes using fork. One of them (the sender process) should send four intergers ab.cd in the range from 0 to 99 inclusive (that are interpreted as the coordinates of two points A,B in the plane A(ab) and BGd)) to the other (the receiver process). The sending process should printout the coordinates of the two points ACa.b) and B(cd). The receiving process should priutout the Manhattan distance between the two points A(ab) and B(Gd). Refer to https://en.wiktionary.org/wiki/Manhattan distance for the definition of Manhattan distance d(A,B) la-c+lb-dl. (30 points) Sample runs of the programs in 1 & 2 are shown below.| 'templ$ /A8p1 Hello am the child. Printing the Lower case version: hello an the parent. Printing the upper case version: HELLO child sent the coordinates of two points: A(9,44) and 8(67,87) parent process received the coordinates of two points: A(9,44) and 8(67,87) The Hanhattan distance between the two points is 58+43-101 parent sent the coordinates of two points: A(45,73) and 8(38,64) child received the coordinates of two points: A(45,73) and B(38,64) The Manhattan distance between the two points is 7+9-16 /templ$ /A8p2_shm templs ./A8p2 pipe

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 Databases Questions!