Question: Write a message delivery program that performs the following functions for n natural numbers. (1) the function of the parent/child process; and Parent process -
Write a message delivery program that performs the following functions for n natural numbers. (1) the function of the parent/child process; and Parent process - Parent processes create child processes and communication channels. - N natural numbers are entered until the last value (negative) is obtained from the standard input device and n is passed to the child process as a parameter. - Deliver n natural numbers to the child process. - Function the standard deviation for n numbers and wait for the child process to end (wait). - The average value (a) and the median value (m) delivered from the child process are received, and the minimum natural number k that satisfies |m-a|/dk is obtained by standard deviation (d), which is the result of the parent process. Child process - The child process remembers the number (m) received by the parameter. - M natural numbers are transmitted through the communication channel. - Average and median values are obtained, and their results are communicated to the parent process and terminated. (2) For example, the value entered in the parent process is 57 74 65 61 37 58 89 145 42 20 4 16 37 58 10 When , n is 14. (3) Programming conditions - Do not use shared-memory and socket connection techniques for message delivery techniques for inter-process communication. - Operating system is selected from Linux, Windows, Mac OS, and language is C/Java. (4) Submissions - Program code and execution results - Output at least one of the details in the pid and PCB block of each process (such as program counters, scheduling information, or memory information)
please code and capture...
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
