Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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 8 will be 100 or larger, it will terminate. Otherwise, it will increase the
number by 8 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 3. It then calls the manager to continue.
Both the manager and the worker can be the starter.
Sample run:from manager: current total is 88
from worker: current total is 85
from manager: current total is 93
from worker: current total is 90
from manager: current total is 98
from worker: current total is 95
from manager: new hiring!from worker: current total is 52
from manager: current total is 60
from worker: current total is 57
from manager: current total is 65
from worker: current total is 62
from manager: current total is 70
from worker: current total is 67
from manager: current total is 75
from worker: current total is 72
from manager: current total is 80
from worker: current total is 77
from manager: current total is 85
from worker: current total is 82
from manager: current total is 90
from worker: current total is 87
from manager: current total is 95
from worker: current total is 92
from manager: new hiring!
image text in transcribed

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_2

Step: 3

blur-text-image_3

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

Database Concepts

Authors: David M. Kroenke, David J. Auer

7th edition

133544621, 133544626, 0-13-354462-1, 978-0133544626

More Books

Students also viewed these Databases questions