Question: ( a ) Design a timed process with the following behavior: 1 . Within any 1 0 second interval, the process must receive 2 events
a Design a timed process with the following behavior:
Within any second interval, the process must receive events of type
A Receiving a second A exactly seconds after the first A is okay, but
receiving it after seconds is bad. If it does not receive two As within
seconds, it goes to an error state and stays there forever.
Within any second interval, it must receive events of type B otherwise
it goes to an error state. If any two B events are more than seconds
apart, it goes to an error state. If it goes to an error state, it stays there
forever.
Let n be a positive integer. At each n seconds, the machine remembers
the number of As and Bs received in the interval n n
For all n at some time in nn the process outputs the number
of As and Bs received in the interval n n on the output OUT.
b Consider an execution where the process never goes to an error
state and the process receives an A exactly when it starts. Let t denote the
time when it receives the second A u denote the time when it receives the first
B and u the time when it receives the third B What are the minimum and
maximum values for u t and u t
c Suppose the user promises that at most one A event is input in
any second window and that any two B events will be separated by at least
second. What is the largest number of A and B events that may be reported
on OUT?
d Design a timed process that ensures the users promise in c In
other words, this process must produce at most one A event is output in any
second window, and it must ensure that two B events are separated by at least
second.
e How would you change the timed process in d so that the
composition of the two timed process guarantees that the timed process in a
never reaches an error state?
f Can you build the process in e such that the
composition of the two timed process has the largest number of executions that
do not hit the error state?
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
