Go backward to Designing the Server Go up to Top Go forward to Designing the Server |
Introduce variable wait to record deferred requests:
ServerC,R(server, client, counter, wait)
:<=>
exists i in [1,C]:
or
...
receivei(server, request) /\ count
<=0 /\
wait' = wait[i |-> true] /\
changed(server, wait)
Need to guarantee progress:
InvariantC,R(pc, server, client,
counter, wait) :<=>
and
...
exists j in [1,C]: wait[j] => Grant only deferred as long as necessary.
count = 0
Need to maintain refined invariant.