Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 4

5.

a) Explain Happens-before relation

Define a logical relation Happens-Before among pairs of events

Happens-Before denoted as

Three rules

1. On the same process: a b, if time(a) < time(b) (using the local clock)

2. If p1 sends m to p2: send(m) receive(m)

3. (Transitivity) If a b and b c then a c

Creates a partial order among events

Not all events related to each other via

b) Explain the properties of Linearizability Shared Memory

Linearizability:

Suppose is a sequence of invocations and responses for a set of


operations.

an invocation is not necessarily immediately followed by its


matching response, can have concurrent, overlapping ops
is linearizable if there exists a permutation of all the operations
in (now each invocation is immediately followed by its matching
response) s.t.

|X is legal (satisfies sequential spec) for all vars X, and

if response of operation O1 occurs in before invocation of


operation O2, then O1 occurs in before O2 ( respects real-
time order of non-overlapping operations in ).

Specification of Linearizable Shared Memory Communication System:

Inputs are invocations on the shared objects

Outputs are responses from the shared objects

A sequence is in the allowable set iff

Correct Interaction: each proc. alternates invocations and matching


responses

Liveness: each invocation has a matching response

Linearizability: is linearizable
c) Describe Bounded Memory Simulation
8.

e) Outline the function get-state () in simulating n processors and one


failure algorithm

You might also like