1.7 KiB
Can we take the most basic protocol that satisfies the most basic liveness property (obstruction freedom) and "upgrade" it to bounded wait freedom?
Contention manager: is an object that allows progress of processes by providing contention-free periods for completing their invocations. It provides 2 operations:
need_help(i)
: invoked byp_i
when it discovers that there is contentionstop_help(i)
: invoked byp_{i}
when it terminates its current invocation
Enriched implementation: when a process realizes that there is contention, it invokes need_help; when it completes its current operation, it invokes stop_help.
Why is it different from lock/unlock? Because this allows failures, and they can also happen in the contention-free period.
PROBLEM: to distinguish a failure from a long delay, we need objects called failure detectors, that provide processes information on the failed processes of the system. According to the type/quality of the info, several F.D.s can be defined.
Eventually restricted leadership: given a non-empty set of process IDs X, the failure detector \Omega_{X}
provides each process a local variable ev_leader(X)
such that:
- (Validity)
ev_leader(x)
always contains a process ID - (Eventual leadership) eventually, all
ev_leader(X)
of all non-crashed processes of X for ever contain the same process ID, that is one of them
REMARK: the moment in which all variables contain the same leader is unknown
NEED_HELP[1..n] : SWMR atomic R/W boolean registers init at false
need_help(i) :=
NEED_HELP[i] <- true
repeat
X <- {j : NEED_HELP[j]}
until ev_leader(X) = i
stop_help(i) :=
NEED_HELP[i] <- false