Question: Question 2 . Suppose we have n programs p 1 , . . . , pn to be executed. The programs are described in an
Question Suppose we have n programs ppn to be executed. The programs are described in an
input text file that looks like the left column below with descriptions on the right:
n n is the number of programs.
path The subsequent n lines contain the fully qualified
paths of the programs to be executed ordered
pathn
from to n
Figure : Sample input file
a Suppose the programs are independent from each other, so that they can be executed in
parallel. Write a parallel program executor, receiving the absolute path of the above
mentioned input file as a commandline argument. This program runs all the programs listed
in the file in parallel.
b Now suppose each program pi depends on all the programs ppi This means the
programs should be executed sequentially, first completing p then p and so on Modify the
parallel program executor you designed in part a to obtain a sequential program executor
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
