Question: Problem 3 . Asynchronous Processes [ 2 5 points ] In this problem, we are going to model a distributed processing system. This system has
Problem Asynchronous Processes points In this problem, we are
going to model a distributed processing system. This system has two kinds of
processes: a manager and a worker process. In our system we will assume
that there is a single manager process and worker processes. Remember that
asynchronous processes are a collection of tasks, each task has a guard, only
when the taskguard is true can the taskupdate execute. Each process can
maintain any number of state variables.
The manager process is as follows:
Initially, it sends true on the activate output to each worker processes.
It receives status signals from each worker when the worker status changes.
It maintains a count of the number of workers whose status is true. Initially
this count is obviously zero. The details on how worker status toggles will be
described in the worker process
It has a task to process a load input from any worker. The value of this
input is two numbers: the first indicating the load value and the second is the
ID of the worker process.
If the load value of the sending worker is higher than the integer LIMIT,
then it enables the stopWorker i task. In this task, the manager sends false
on the activate output to the worker. If it is lower than LIMIT, no action
is taken.
The manager process has a permanently enabled task that randomly chooses
any worker process to which it has previously sent a "deactivation" signal and
sends it a true on the corresponding activate output.
Each worker process is as follows:
Each worker process maintains a counter called load that is initialized to
Initially, the worker process is OFF. When it receives a true on its activate
input, it turns ONYou can model the process turning on or off with a perma
nently enabled task
If the worker process is ON it has four kinds of tasks that are enabled. The
take Job task increases the counter by a random integer in The doneJob
task decreases the counter by if it is greater than Otherwise, it has no
effect. The reportStatus task sends the value true on its attatus output. The
sendLoad task sends the value of the counter load and the ID of the worker
process to the manager process.
If the worker process is OFF, the reportStatus task is enabled and sends
the value false on its status output. Tasks takeJob, doneJob, and sendLoad
are disabled.
If the worker process is ON and it receives false on its activate input, then
it turns OFF. In the OFF state, the coolOff task is enabled. In this task, if
the load value is nonzero, it decreases the load value by
If the worker process is OFF and it receives a true on its activate input but
the load value is not zero, the activation is remembered, but the process does
not become ON till the load value becomes zero. if the load value is zero when
true is received on the activate signal, then the worker process turns ON
Describe each process using either the asynchronous reactive component
formalism or as an extended state machine. Please show only one representative
worker process! Do not draw of them. Clearly identify the inputs, outputs,
and states of each process and describe their types. Comment on whether each
process is finite or infinite state, and deterministic or nondeterministic.
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
