Transactions on the Cray MTA
The MTA hardware supports producer-consumer variables using full-empty bits
A trap occurs after a thread has waited for a while
- normally, the trap handler then enqueues the thread state for later resumption when the thread can succeed
Two-phase commit can be implemented by producing incrementally a linked list of the objects to be acquired
- producing into the link in an object also locks it
- if the linking process blocks, the trap handler can “back out” by consuming its links in reverse order
When all objects are locked, the transaction commits
- object modification must be postponed until then
Finally, the list is unlocked to complete the transaction