• Keine Ergebnisse gefunden

Concurrency theory

N/A
N/A
Protected

Academic year: 2021

Aktie "Concurrency theory"

Copied!
2
0
0

Wird geladen.... (Jetzt Volltext ansehen)

Volltext

(1)

Concurrency theory

Exercise sheet 10

TU Braunschweig

Sebastian Muskalla, Prakash Saivasan Winter term 2017/18

Out: January 10 Due: January 16

Submit your solutions until Tuesday, January 16, during the lecture.

Exercise 1: Bounded round reachability

Describe the general case for the bounded round TSO-reachability problem that was described in the lecture. LetPbe a parallel program withn∈Nthreads and a boundk∈Non the number of rounds that each thread can make. Explain how to construct a programPsuch that for each program counterpcinPand its equivalent program counterpcinP, the following holds.

pcis TSO-reachable inPiffpcis SC-reachable inP.

Note: You do not have to give a formal construction. It is sufficient to list the additional global variables needed, explain their meaning and how they are used byP.

Exercise 2: Trace robustness strictly implies reachability robustness Prove the following Lemma from the lecture.

a) If TrTSO( P)

= TrSC( P)

for some program, then ReachTSO(P) = ReachSC(P).

Here, ReachTSO(P) ={

pccf0TSO (pc,val,buf) withbuf(i) =εfor alli}

and ReachSC(P) is ob- tained by restricting the definition to computations in which each issue (STORE) is followed by the store (UPDATE).

b) The reverse implication does not hold.

(2)

Remark: Relations

Recall the following basic definitions forrelations.

LetNbe a set and let⩽⊆N×Nbe a relation.

Recall thatNisreflexiveifxxfor allx∈ N. It isantisymmetricifxyandyximplyx =y (for allx,y N). It istransitiveifxyandyzimplyxz(for allx,y,z N). If all three properties hold, we call⩽apartial order.

A partial order is calledtotal(or linear) if any two elements are comparable, i.e.

∀x,y∈N: xyoryx.

We let⩽denote the reflexive-transitive closure of⩽, the smallest subset ofN×Nthat contains

⩽and is reflexive and transitive.

We may see (N,⩽) as a directed graph. We call⩽acyclicif this graph does not contain a non- trivial cyclex0x1⩽. . .⩽xmx0. (Cycles of the shapex0x0are trivial.)

Exercise 3: Relations

LetNbe afiniteset and let⩽⊆N×Nbe a relation.

a) Explain how to construct⩽from⩽within a finite number of steps.

b) Prove that⩽is a partial order (i.e. antisymmetric) if and only if⩽is acyclic.

c) Now assume that⩽po is some partial order. Prove that there is a total order⩽to N ×N containing⩽po, i.e.⩽poto.

d) (Bonus exercise, not graded.) Do b) and c) still hold ifNis infinite?

Exercise 4: Shasha and Snir

Prove the Lemma by Shasha and Snir:

A trace Tr( τ)

TrTSO( P)

is in TrSC( P)

if and only if its happens-before relation→hbis acyclic.

Proceed as follows:

a) Show that for traces of SC computations,→hbis necessarily acyclic.

b) Show how from a trace with acyclic→hb, one can construct an SC computationτwith Tr( τ)

= Tr( τ)

. Hint:Use Exercise 3.

Referenzen

ÄHNLICHE DOKUMENTE

Proof. This is a direct consequence of Proposition 3.1, where we note that an elliptic curve E on a smooth projective variety X is contracted via the Albanese map of X if and only

[r]

What

Karlsruher Institut f¨ ur Technologie Institut f”ur Theoretische Festk¨ orperphysik Ubungen zur Modernen Theoretischen Physik I ¨ SS14.. -

Prof. Then U is not isomorphic to the aÆne. line. But that means that the map cannot

A finite graph contains a Eularian cycle, if there is a cycle which visits every edge exactly once. This is known to be equivalent to the graph being connected (except for nodes

The game Geography is played by two players on a directed graph G = (V, E) with a distin- guished starting position u. The first player starts at

Throughout, R denotes a ring, and, unless otherwise stated, all rings are assumed to be associative rings with 1, and modules are assumed to be left