Answered step by step
Verified Expert Solution
Question
1 Approved Answer
I just need help writing the pseudocode Write first the pseudo code of your program to show its key steps whose details given below. This
I just need help writing the pseudocode
Write first the pseudo code of your program to show its key steps whose details given below. This Pseudocode has three major parts: the main body + parent part + child part. Following items should be parts of the tasks your pseudocode must show: Initialization RNG using seed Create pipe & fork Identify and assign parent task Identify and assign child task Initialize pipe for read or write Communication via the pipe For each process outline and complete its own tasks Print results and exit . Program: Pipe & Fork, and IPC: 20 points [Feb 11, 11:00 pm, on BGLinux] Overview: Write a C++ wrapper [embeds C] program called pipeLab.cpp that creates a pipe channel and then a child process to communicate via the pipe with the parent. The parent writes to a pipe with multiple random numbers while the child reads numbers from the pipe and do some statistical calculations. When done, both processes print their messages and exit the program. Details: The parent calls first the pipe system-call and creates the pipe, then calls the fork to create the child. After that, both parent and child prepare a one-way pipe channel, where the parent fills the pipe one-at-a-time with random numbers [i.e. items] until certain limit [numItems] is reached. The child reads these numbers one-at-a-time, update the received data, and at the end finds the min, max and avg (average) of all number received, and prints the results on the screen with its own real ID [i.e. using getpid() system call]: Child TD. number Write first the pseudo code of your program to show its key steps whose details given below. This Pseudocode has three major parts: the main body + parent part + child part. Following items should be parts of the tasks your pseudocode must show: Initialization RNG using seed Create pipe & fork Identify and assign parent task Identify and assign child task Initialize pipe for read or write Communication via the pipe For each process outline and complete its own tasks Print results and exit . Program: Pipe & Fork, and IPC: 20 points [Feb 11, 11:00 pm, on BGLinux] Overview: Write a C++ wrapper [embeds C] program called pipeLab.cpp that creates a pipe channel and then a child process to communicate via the pipe with the parent. The parent writes to a pipe with multiple random numbers while the child reads numbers from the pipe and do some statistical calculations. When done, both processes print their messages and exit the program. Details: The parent calls first the pipe system-call and creates the pipe, then calls the fork to create the child. After that, both parent and child prepare a one-way pipe channel, where the parent fills the pipe one-at-a-time with random numbers [i.e. items] until certain limit [numItems] is reached. The child reads these numbers one-at-a-time, update the received data, and at the end finds the min, max and avg (average) of all number received, and prints the results on the screen with its own real ID [i.e. using getpid() system call]: Child TD. numberStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started