diff --git a/Concurrent Systems/notes/5 - Software Transactional Memory.md b/Concurrent Systems/notes/5 - Software Transactional Memory.md index 180ff6d..e3cce6a 100644 --- a/Concurrent Systems/notes/5 - Software Transactional Memory.md +++ b/Concurrent Systems/notes/5 - Software Transactional Memory.md @@ -142,6 +142,7 @@ X.read_T(i) := ∀ Y ∉ read_set(T) do t_depend_T[Y] <- max{t_depend_T[Y], lc(XX).depend[Y]} + # a che serve? return lc(XX).val @@ -153,6 +154,9 @@ X.write_T(v) := try_to_commit_T() := lock all read_set(T) U write_set(T) + + if ∃ Y ∈ read_set(T) s.t. + ∀ X ∈ read_set(T) if XX.date >= birthdate(T) then release all locks