Question: Question Number: Consider the following figure which shows two traffic lights next to each other and both can switch to green at the same time,
Question Number: Consider the following figure which shows two traffic lights next to each other and both can switch to green at the same time, yielding to all kinds of problems. Therefore, it is required to ensure that at any point in time one of the two traffic lights is red. In this problem, you have two concurrent processes (traffic lights) and you have to synchronize them in some way that they exhibit a safe behavior. Use PETRI NET to model, how the two traffic lights can be synchronized in two different ways i.e., NON-DETERMINISTIC (any one traffic light green at a time) and ALTERNATE (traffic lights green one by one). Also, write initial and subsequent marking with comments.
r1 r2 rg1 rg2 or 1 g1 g2 or2 go1 go2 01 02 r1 r2 rg1 rg2 or 1 g1 g2 or2 go1 go2 01 02
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
