ä3
variables: A, B, C which are shared by thread T1 and thread T2
äT1
computes C = A+B
äT2
transfers amount X from A to B
äT2
must do: A = A-X and B = B+X (so that A+B is unchanged)
äBut
if T1 computes A+B after T2 has done A = A-X but before B = B+X, T1 will not obtain the correct
result for C = A + B
äSolution:
critical sections (later)