Question: Write a bash program called manager and a C program called worker.c . The manager and the worker call each other to alternate the execution,
Write a bash program called manager and a C program called worker.c The manager and
the worker call each other to alternate the execution, passing the current number of tasks
via command line argument.
The manager receives from command line argument, the current number of tasks. If this
number plus will be or larger, it will terminate. Otherwise, it will increase the
number by and then calls the worker to continue, passing the increased number through
command line argument.
The worker receives the current number of tasks from the manager and decreases the
number by It then calls the manager to continue.
Both the manager and the worker can be the starter.
Sample run:from manager: current total is
from worker: current total is
from manager: current total is
from worker: current total is
from manager: current total is
from worker: current total is
from manager: new hiring!from worker: current total is
from manager: current total is
from worker: current total is
from manager: current total is
from worker: current total is
from manager: current total is
from worker: current total is
from manager: current total is
from worker: current total is
from manager: current total is
from worker: current total is
from manager: current total is
from worker: current total is
from manager: current total is
from worker: current total is
from manager: current total is
from worker: current total is
from manager: new hiring!
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
