Task 3

[ Class Overview ]

Task 3: Interrupt synchronization for OOStuBS with the pro/epilogue model

Learning objectives

Task description

You should change the synchronization of the activities within OOStuBS to use the pro/epilogue model. You have to modify your previous solution (task 2) so that the synchronization is no longer done by interrupt locks (hard synchronization).

To achieve this, you have to adapt or extend classes Keyboard, Panic, Gate and function guardian(). Classes Locker, Guard and Secure must be newly created. Of course, you also need to modify your application accordingly.

In addition, you should create a global Guard object to protect all critical sections.

Implementation notes

Template code

For the creation of the epilogue queue, we provide the helper classes Queue and Chain. However, the implementation is not interrupt-transparent! So either you have to synchronize "hard" at a suitable place, or you have to write your own interrupt-transparent implementation.