Answered step by step
Verified Expert Solution
Link Copied!

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

image text in transcribed

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. number

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

MySQL Crash Course A Hands On Introduction To Database Development

Authors: Rick Silva

1st Edition

1718503008, 978-1718503007

More Books

Students also viewed these Databases questions