Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

i forgot to speicify, could you please do the question c langauge. Suppose we have n programs p 1 , . . . , pn

i forgot to speicify, could you please do the question c langauge. Suppose we have n programs p1,...,pn 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_1 The subsequent n lines contain the fully qualified
. paths of the programs to be executed (ordered
..
path_n
from 1 to n).
Figure 1: 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 command-line argument. This program runs all the programs listed
in the file in parallel.
(b) Now suppose each program pi depends on all the programs p1,...,pi1. This means the
programs should be executed sequentially, first completing p1, then p2 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

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

More Books

Students also viewed these Databases questions

Question

Question What integration level should an employer choose?

Answered: 1 week ago