Question: Question 5 : Pipes ( Max Mark: 1 2 / 1 0 0 ) This question requires you to implement a user program in xv

Question 5: Pipes (Max Mark: 12/100) This question requires you to implement a user program in xv6-riscv. This program will make use of system calls fork, pipe, read, and write. Task: Write a user program in xv6, name it pingpong. It should do the following: (a) Create a child process. (b) The parent will send an integer to this child process. (c) Upon receiving this integer, the child process prints its PID followed by the value of the integer it received. (d) The child process should multiply the received integer by 4 and send the resulting integer back to the parent. (e) The parent prints its PID followed by the value of the integer it received from the child. Example of usage: $ pingpong 4 Integer from parent =43 Integer from child =16

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!