Task 3

[ Class Overview ]

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

Learning objectives

Task description

The synchronization of the activities within OOStuBS should be changed to the use of the pro/epilogue model. Your previous program (task 2) has to be modified so that the synchronization is no longer done by interrupt locks (hard synchronization).

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

In addition, a global Guard object should be created, to protect all critical sections.

Implementation notes

Specifications

For the creation of the epilogue queue the helper classes Queue and Chain are given. However, the implementations are not interrupt-transparent! So either you synchronize hard at a suitable place, or you write your own interrupt-transparent implementation.