diff --git a/Concurrent Systems/notes/5 - Software Transactional Memory.md b/Concurrent Systems/notes/5 - Software Transactional Memory.md index 33ec44d..108f056 100644 --- a/Concurrent Systems/notes/5 - Software Transactional Memory.md +++ b/Concurrent Systems/notes/5 - Software Transactional Memory.md @@ -137,11 +137,12 @@ X.read_T(i) := t_depend_T[X] <- lc(XX).depend[X] if ∃ Y ∈ read_set(T) s.t. t_dependT[Y] < lc(XX).depend[Y] then + # l'X che ho letto dipende da un Y che ABORT - if lc(XX).date >= birthdate(T) then - ABORT - read_set(T) <- read_set(T) U {X} + ∀ Y ∉ read_set(T) do + t_depend_T[Y] <- max{t_depend_T[Y], lc(XX).depend[Y]} + return lc(XX).val X.write_T(v) :=