COS226 - Lecture - Concurrent Objects - 2

COS226 - Lecture - Concurrent Objects - 2 - COS226:...

Info iconThis preview shows pages 1–9. Sign up to view the full content.

View Full Document Right Arrow Icon
COS226: Concurrent Systems Chapter 3: Concurrent Objects Part 2
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Correctness Properties Sequential Objects Concurrent Objects Sequential Documentation Describing Objects Compositional Quiescent Non-compositional Sequential Linearizability
Background image of page 2
Linearizability Principle 3.5.1: Each method call should appear to take effect instantaneously at some moment between its invocation and response.
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Linearizability Linearization points are used to show that an object is linearizable: Lock-based implementations; Lock-free implementations.
Background image of page 4
Linearizability public T deq() throws EmptyException { lock.lock(); try { // Dequeue an item } finally { lock.unlock(); } }
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Linearizability public T deq() throws EmptyException { if (tail – head == 0) throw new EmptyException(); Tx = items[head % items.length]; head++; return x; }
Background image of page 6
Applications Quiescent consistency Sequential consistency Linearizability
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Refer to lock-based queue: A halts midway during enq;
Background image of page 8
Image of page 9
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 15

COS226 - Lecture - Concurrent Objects - 2 - COS226:...

This preview shows document pages 1 - 9. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online