Question: Wait Die Scheduler Write a function, named wait _ die _ scheduler that takes a list of actions, and returns a list of actions according

Wait Die Scheduler
Write a function, named wait_die_scheduler that takes a list of actions, and returns a list of actions according to the following rules.
The actions given to the scheduler will only consist of WRITE and COMMIT actions (Hence only exclusive locks need be implemented). Each transaction will end with a COMMIT action.
Before examining each action, attempt to perform an action for each of the transactions encountered (ordered by their names).
After all the actions have been examined, continue to attempt to perform an action from each transaction until there are no more actions to be done.
You will need to add LOCK, UNLOCK, and ROLLBACK actions to the list of actions to be returned, according to the Wait-Die protocol.
If releasing more than one lock (for instance after a COMMIT), release them in order by the name of their object.
Use the deferred transaction mode (only requesting locks when needed).

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 Programming Questions!