Question: Consider a scenario in which two processes (P1 and P2) send request to acquire a resource. The resource can be shared between the two processes

Consider a scenario in which two processes (P1 and P2) send request to acquire a resource. The resource can be shared between the two processes in such a way that if P1s request succeeds then P2 has to wait. Similarly, If P2s request succeeds then P1 has to wait. The Petri-Net model of the scenario is shown in the following figure. The sharing process can be synchronized in two different ways i.e., NON-DETERMINISTIC (any one process either P1 or P2 can access the resource at a time) and ALTERNATE (resource share one by one). You have to write initial and subsequent marking with comments for both the resource sharing conditions i.e., NON-DETERMINISTIC and ALTERNATE.

[Note: For NON-DETERMINISTIC condition the following model can be used. However, for ALTERNATE resource sharing the following model need to be changed by introducing one additional place. Therefore, before writing the initial and subsequent marking for ALTERNATE resource sharing condition you have to sketch a new petri-net model]. .

Consider a scenario in which two processes (P1 and P2) send request

Pi Freq P-req 11 start t2 - start 2 2 t - release t2-release Pi Freq P-req 11 start t2 - start 2 2 t - release t2-release

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!