Chapter 3 Flashcards
In OO programming what is an object
container for Data
What is an example of a state (set of fields)
a sequence of items in a Queue
What is an example of methods
enq + deq
What is the safety + liveness properties of an object
Safety: nothing bad happens (correctness). Liveness: something good eventually happens (progress)
How to determine if an object’s are behaving correctly?
Pre/post conditions
Can concurrent methods overlap?
Yes
Should you characterize all possible interactions with concurrent calls?
Yes
Principle 3.3.1
Method calls should appear to happen in a one-at-a-time sequential order
When is a object quiescenct
when it has no method calls (inactive)
Principle 3.3.2
Methods calls separated by a period of quiescence should appear to take effect in real-time order(if methods call is separated by gap of inactivity…)
What does 3.3.1 and 3.3.2 form
Quiescent consistency
When is a object quiescent consistent
If method calls appear to be in sequential order, method calls take place in real-time order if separated by period of inactivity
Is Quiescent consistency compositional?
Yes. If Each object in the system the whole system will be quiescent consistent
Principle 3.4.1
Method calls should take effect in program order(order in which a single thread issues method calls)
Is method calls by different calls unrelated by program order?
Yes