Question: Based upon Barz's algorithm on General Semaphore that allows multiple processes stay in CR (Critical Section) up to a certain number. You are asked to

 Based upon Barz's algorithm on General Semaphore that allows multiple processes

Based upon Barz's algorithm on General Semaphore that allows multiple processes stay in CR (Critical Section) up to a certain number. You are asked to use Promela and SPIN to show how the following problem works 1. Here is a scenario that you are asked to develop, verify and implement using your SPIN program There are 5 processes, say messengers, who want to deliver their important letter to their Queen. Each messenger can enter the Queen's antechamber to deliver their letter, so that there is a good chance to see all 5 messengers in the CR room. However, the Queen allows only one messenger with the highest priority in the CR room after reading the priorities of all those messages, and others are forced to retire from the antechamber but can try for the next round; a. i. ii. iii. Each message begins with a unique message id that can be used as priority, so that the Queen always selects the messenger with the highest priority message id The recommend data structure is: messenger-id (byte), priority (byte), message (two letters). You are okay to print the message in the CR. You may use channel to send and receive messages iv. 2. In remainder section of each process, a. Print the messenger name, id and priority; 3. Document your work such as: a. b. c. How to develop your program; How to implement your program as the way your instructor can implement; Explain the implementation of your Promela program; Based upon Barz's algorithm on General Semaphore that allows multiple processes stay in CR (Critical Section) up to a certain number. You are asked to use Promela and SPIN to show how the following problem works 1. Here is a scenario that you are asked to develop, verify and implement using your SPIN program There are 5 processes, say messengers, who want to deliver their important letter to their Queen. Each messenger can enter the Queen's antechamber to deliver their letter, so that there is a good chance to see all 5 messengers in the CR room. However, the Queen allows only one messenger with the highest priority in the CR room after reading the priorities of all those messages, and others are forced to retire from the antechamber but can try for the next round; a. i. ii. iii. Each message begins with a unique message id that can be used as priority, so that the Queen always selects the messenger with the highest priority message id The recommend data structure is: messenger-id (byte), priority (byte), message (two letters). You are okay to print the message in the CR. You may use channel to send and receive messages iv. 2. In remainder section of each process, a. Print the messenger name, id and priority; 3. Document your work such as: a. b. c. How to develop your program; How to implement your program as the way your instructor can implement; Explain the implementation of your Promela program

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!