Question: Implement a program to synchronize, with Unix/Linux pipes, concurrent processes which perform arithmetic operations. You will learn concepts from several computer science disciplines, including data
Implement a program to synchronize, with Unix/Linux pipes, concurrent processes which perform arithmetic operations. You will learn concepts from several computer science disciplines, including data flow architecture, parallel computation, and, of course, operating systems. The input (passed as the first argument of your main program) to your program is a process precedence/dataflow graph specified in the following format: input_var a,b,c,d; internal_var p0,p1,p2,p3; a -> p0; - b -> p0; c -> p1; + d -> p1; a -> p2; - d -> p2; p0 -> p3; * p1 -> p3; + p2 -> p3; write(a,b,c,d,p0,p1,p2,p3). input_var declares input variables to be read by your program. Each input value (after it is read) is stored in a process you create. internal_var declares internal variables whose values will be computed by processes you create. There will be a distinct process to handle the calculation for each internal variable. To keep the input simple, the values of the input variables to be read by your program will be in the same order they appear in the input var declaration. There will be no syntax/semantic errors. Also, there are at most 10 input variables and 10 internal variables.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
