Audio transcript and materials used on 28th October 2021 for part Ib Computer Science Concurrent and Distributed Systems Examples Class 2.
If your voice is audible and you want to be removed, please let DJG know.
In a banking system where accounts cannot become overdrawn, some of the following types transactions often run concurrently:
(a) Discuss the potential for interference between any of these transactions. [7 marks]
(b) Demonstrate the effect of concurrency control based on strict two-phase locking in relation to the discussion in (a). Does it help? [8 marks]
(c) Does 2PL help when customer x might issue several transfer requests from their account A? [5 marks]
[Hint: you may assume that operations on bank account objects, such as debit,
credit and add-interest are atomic.]
(a) What is meant by a serializable order for two or more transactions? [2 marks]
(b) Explain how timestamp ordering (TSO) enforces isolation. [5 marks]
(c) Draw and explain a history graph for two transactions whose invocations of a set of conflicting operations are serializable but which are rejected by TSO. [5 marks]
(d) Considering Optimistic Concurrency Control (OCC):
(i) State the properties of a transaction’s set of shadow copies that must be verified at commit time.
[2 marks]
(ii) Carefully explain the algorithm used by a single-threaded commit-time validator. [4 marks]
[ONLINE ANSWER IS JUST A REPLICATION OF THE LECTURE NOTES!]
(e) [DISTRIBUTED SYSTEMS] Consider a system in which the transactions cause updates to objects which
are not all located on a single server but which are distributed widely around
the Internet. What factors would influence your choice of using TSO or OCC
to enforce isolation? [2 marks]
Differences between monitors and active objects (and commonalities).
Which do actor models use and why/when is the other important?
Of interest perhaps, but this material is certainly not on the syllabus for this course (and DJG is not an expert).
I pulled up this Wikipedia page: Dekker Algorithm.