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]. .
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started