Freitag, 13. März 2009

CS4282/CS6282 Internet and Distributed Systems Programming

CS4282/CS6282 Internet and Distributed Systems Programming

Doug Lea : Concurrent Programming in Java

notes on p.159

State Dependence

1. Exclusion techniques are mainly concerned with maintaining invariants.

2. State-dependent concurrency control imposes additional concerns surrounding preconditions and postconditions.

3. Actions may have state-based preconditions that need NOT always HOLD when clients invoke methods on the host object.

4. Conversely, actions may have postconditions that are Unattainable:

a) when the host object is NOT in a proper state;
b) when the actions of other objects it relies on FAIL to achieve their own postconditions; or
c) when the acations of other threads have changed the states of other objects being relied on.

5. Most design issues for classes with state-dependent actions revolve around the considerations necessary to "complete " a design so that you take into account all possible combinations of messages and states.



Keine Kommentare: