Synchronous and Asynchronous Interaction in Distributed Systems - - PowerPoint PPT Presentation

synchronous and asynchronous interaction in distributed
SMART_READER_LITE
LIVE PREVIEW

Synchronous and Asynchronous Interaction in Distributed Systems - - PowerPoint PPT Presentation

Introduction and Basic Notions Distributed Systems 1 / 38 Synchronous Interaction and Distribution Structural Conflict Nets Synchronous and Asynchronous Interaction in Distributed Systems Ursula Goltz, Uwe Nestmann, Kirstin Peters, and


slide-1
SLIDE 1

Introduction and Basic Notions Distributed Systems Synchronous Interaction and Distribution Structural Conflict Nets 1 / 38

Synchronous and Asynchronous Interaction in Distributed Systems

Ursula Goltz, Uwe Nestmann, Kirstin Peters, and Jens-Wolfhard Schicke

in cooperation with Rob v. Glabbeek

March 2010

Goltz, Nestmann, Peters, Schicke Bamberg, March 2010

slide-2
SLIDE 2

Introduction and Basic Notions Distributed Systems Synchronous Interaction and Distribution Structural Conflict Nets 2 / 38

Distributed reactive systems

Hardware/Software

◮ localities ◮ spatially distributed ◮ communication may take time, no global clock

Goltz, Nestmann, Peters, Schicke Bamberg, March 2010

slide-3
SLIDE 3

Introduction and Basic Notions Distributed Systems Synchronous Interaction and Distribution Structural Conflict Nets 3 / 38

Contents

◮ Introduction and Basic Notions ◮ Distributed Systems

How can we characterise distributed computing?

◮ Synchronous Interaction and Distribution

Is synchronous interaction possible in a distributed system?

Goltz, Nestmann, Peters, Schicke Bamberg, March 2010

slide-4
SLIDE 4

Introduction and Basic Notions Distributed Systems Synchronous Interaction and Distribution Structural Conflict Nets 4 / 38

Synchronous vs. Asynchronous Interaction

Synchronous Interaction Asynchronous Interaction

Goltz, Nestmann, Peters, Schicke Bamberg, March 2010

slide-5
SLIDE 5

Introduction and Basic Notions Distributed Systems Synchronous Interaction and Distribution Structural Conflict Nets 5 / 38

Implementation: Asynchrony via Synchrony

Buffer

Goltz, Nestmann, Peters, Schicke Bamberg, March 2010

slide-6
SLIDE 6

Introduction and Basic Notions Distributed Systems Synchronous Interaction and Distribution Structural Conflict Nets 6 / 38

Implementation: Synchrony via Asynchrony?

Goltz, Nestmann, Peters, Schicke Bamberg, March 2010

slide-7
SLIDE 7

Introduction and Basic Notions Distributed Systems Synchronous Interaction and Distribution Structural Conflict Nets 7 / 38

Some related work

◮ distributed algorithms – dining philosophers, leader

election, snapshots [Boug´ e, Lehmann/Rabin, Palamidessi]

◮ distributed algorithms with failure

[Lynch]

◮ CSP – dropping input and/or output guards, output only in

parallel [de Boer, Palamidessi, Boug´ e]

◮ π-calculus – dropping input and/or output guards,

asynchronous sending [Palamidessi, Nestmann, Gorla]

◮ Petri nets

[Reisig, Hopkins]

Goltz, Nestmann, Peters, Schicke Bamberg, March 2010

slide-8
SLIDE 8

Introduction and Basic Notions Distributed Systems Synchronous Interaction and Distribution Structural Conflict Nets 8 / 38

Petri nets

◮ places ◮ transitions ◮ flow relation ◮ initial marking

We consider structural conflict place transition systems.

◮ Transitions with a common preplace must not fire in the

same step

◮ No auto concurrency ◮ Feels just like one-safe, but isn’t

Goltz, Nestmann, Peters, Schicke Bamberg, March 2010

a b c

slide-9
SLIDE 9

Introduction and Basic Notions Distributed Systems Synchronous Interaction and Distribution Structural Conflict Nets 9 / 38

Synchronous interaction in distributed systems

◮ Distributed systems as Petri nets ◮ Which Petri nets containing synchronous interactions may

be transformed into a “distributed” Petri net with only asynchronous interactions between components?

◮ Suitable equivalence notion required

Goltz, Nestmann, Peters, Schicke Bamberg, March 2010

slide-10
SLIDE 10

Introduction and Basic Notions Distributed Systems Synchronous Interaction and Distribution Structural Conflict Nets 10 / 38

Equivalence notions for reactive systems

branching between alternative behaviour

[ R. v. Glabbeek: The linear time - branching spectrum I ]

trace equivalence completed trace equivalence failures equivalence bisimulation equivalence readiness equivalence concurrency/ causality pomset trace equivalence step trace equivalence

[ R. v. Glabbeek, U. Goltz: Refinement of actions and equivalence notions for concurrent systems ]

hereditary history preserving bisimulation

Goltz, Nestmann, Peters, Schicke Bamberg, March 2010

slide-11
SLIDE 11

Introduction and Basic Notions Distributed Systems Synchronous Interaction and Distribution Structural Conflict Nets 10 / 38

Equivalence notions for reactive systems

branching between alternative behaviour

[ R. v. Glabbeek: The linear time - branching spectrum I + II ]

trace equivalence completed trace equivalence failures equivalence bisimulation equivalence readiness equivalence concurrency/ causality pomset trace equivalence step trace equivalence

[ R. v. Glabbeek, U. Goltz: Refinement of actions and equivalence notions for concurrent systems ]

abstraction from unobservable actions weak bisimulation equivalence

Goltz, Nestmann, Peters, Schicke Bamberg, March 2010

slide-12
SLIDE 12

Introduction and Basic Notions Distributed Systems Synchronous Interaction and Distribution Structural Conflict Nets 10 / 38

Equivalence notions for reactive systems

branching between alternative behaviour

[ R. v. Glabbeek: The linear time - branching spectrum I + II ]

trace equivalence completed trace equivalence failures equivalence bisimulation equivalence readiness equivalence concurrency/ causality pomset trace equivalence step trace equivalence

[ R. v. Glabbeek, U. Goltz: Refinement of actions and equivalence notions for concurrent systems ]

abstraction from unobservable actions step readiness equivalence

Goltz, Nestmann, Peters, Schicke Bamberg, March 2010

slide-13
SLIDE 13

Introduction and Basic Notions Distributed Systems Synchronous Interaction and Distribution Structural Conflict Nets 11 / 38

Step readiness equivalence

◮ respects branching structure sufficiently ◮ gives necessary information about concurrency

◮ can detect serialisation of actions due to co-location

◮ abstracts from τ-transitions

◮ can implement synchronisation protocols

◮ no causality

◮ more freedom in protocol implementation ◮ too much? Goltz, Nestmann, Peters, Schicke Bamberg, March 2010

slide-14
SLIDE 14

Introduction and Basic Notions Distributed Systems Synchronous Interaction and Distribution Structural Conflict Nets 12 / 38

Step readiness equivalence formally

<σ, X> is a step ready pair of a Petri net N iff

◮ σ is a fireable sequence of visible transitions

(abstracting from τ-transitions and executing all possible τ-transitions before stopping)

◮ X is the set of all possible steps after σ

Two Petri nets are step readiness equivalent iff they have the same set of ready pairs.

Goltz, Nestmann, Peters, Schicke Bamberg, March 2010

slide-15
SLIDE 15

Introduction and Basic Notions Distributed Systems Synchronous Interaction and Distribution Structural Conflict Nets 13 / 38

LSGA Nets

A distributed system...

◮ consists of sequential components ◮ sequential components interact asynchronously

... as a Petri net (LSGA net)

◮ sequential Petri net components with interfaces

(input and output) places

◮ parallelism via asynchronous parallel composition

(fusion of input and output places) LSGA = locally sequential globally asynchronous similar to [Reisig]

Gee, I noticed some parts of the slides... Bamberg, March 2010

slide-16
SLIDE 16

Introduction and Basic Notions Distributed Systems Synchronous Interaction and Distribution Structural Conflict Nets 14 / 38

LSGA Example

... never really contain any useful information Bamberg, March 2010

a b a′ b′ c′

input

  • utput

S-invariant

slide-17
SLIDE 17

Introduction and Basic Notions Distributed Systems Synchronous Interaction and Distribution Structural Conflict Nets 15 / 38

Petri nets as distributed systems

More abstract characterisation of distributed systems possible:

◮ Transitions and their preplaces are always on the same

location (synchronous interaction is to be preserved).

◮ Transitions which may occur in one step are not placed on

the same location (otherwise concurrency would be restricted). We call a Petri net distributed iff it is possible to put its elements

  • n locations such that these requirements are respected.

Goltz, Nestmann, Peters, Schicke Bamberg, March 2010

slide-18
SLIDE 18

Introduction and Basic Notions Distributed Systems Synchronous Interaction and Distribution Structural Conflict Nets 16 / 38

LSGA nets vs. distributed nets

◮ Every LSGA net is distributed. ◮ For each distributed net, an equivalent LSGA net exists.

Goltz, Nestmann, Peters, Schicke Bamberg, March 2010

slide-19
SLIDE 19

Introduction and Basic Notions Distributed Systems Synchronous Interaction and Distribution Structural Conflict Nets 17 / 38

Semi-structural characterisation of distributed nets

A Petri net N is distributed iff it has no border concurrent long M.

a b c d e

enabled in the same marking

I bet, you are not reading this concurrently Bamberg, March 2010

slide-20
SLIDE 20

Introduction and Basic Notions Distributed Systems Synchronous Interaction and Distribution Structural Conflict Nets 18 / 38

Implementation of Petri nets as distributed nets

... und hence as LSGA nets allowed

◮ multiple transitions with the same label ◮ additional τ-transitions ◮ new causal relations

disallowed

◮ less parallelism ◮ branching-time violations

formally: step readyness equivalence

Goltz, Nestmann, Peters, Schicke Bamberg, March 2010

slide-21
SLIDE 21

Introduction and Basic Notions Distributed Systems Synchronous Interaction and Distribution Structural Conflict Nets 19 / 38

Distributable systems

◮ A Petri net N is called distributable iff there exists a labelled

distributed Petri net N’ which may contain τ-transitions, such that N is step readiness equivalent to N’.

◮ A Petri net is called truly synchronous iff it is not

distributable.

Goltz, Nestmann, Peters, Schicke Bamberg, March 2010

slide-22
SLIDE 22

Introduction and Basic Notions Distributed Systems Synchronous Interaction and Distribution Structural Conflict Nets 20 / 38

Impossibility result for distributed implementations

A Petri net with a fully reachable pure M is truly synchronous.

a b c

enabled together

see also [Proceedings MFCS 2008]

This was Rob’s inspiration, real neat Bamberg, March 2010

slide-23
SLIDE 23

Introduction and Basic Notions Distributed Systems Synchronous Interaction and Distribution Structural Conflict Nets 21 / 38

An implementation

◮ Everything not truly synchronous can be implemented up

to step readiness equivalence.

◮ Conjecture: Finite specifications are implemented by finite

systems.

◮ We have a construction, but no proof yet ◮ We have a proof for an infinite construction

◮ Nearly local transformation.

A Petri net is truly synchronous if and only if it has a fully reachable pure M.

Goltz, Nestmann, Peters, Schicke Bamberg, March 2010

slide-24
SLIDE 24

Introduction and Basic Notions Distributed Systems Synchronous Interaction and Distribution Structural Conflict Nets 22 / 38

Intuition

◮ Find sets of directly conflicting actions. As no fully

reachable pure Ms exist, no parallelism in these sets.

◮ Works for one-safe nets ◮ ... and structural conflict nets

◮ Detect these sets along relatively local structures. ◮ Enable each set completely while concentrating the conflict

  • n a single place.

◮ After firing, clean up a lot of protocol.

◮ Trivial in infinite construction Goltz, Nestmann, Peters, Schicke Bamberg, March 2010

slide-25
SLIDE 25

Introduction and Basic Notions Distributed Systems Synchronous Interaction and Distribution Structural Conflict Nets 23 / 38

Example, infinite Construction

1 2 3

Goltz, Nestmann, Peters, Schicke Bamberg, March 2010

slide-26
SLIDE 26

Introduction and Basic Notions Distributed Systems Synchronous Interaction and Distribution Structural Conflict Nets 24 / 38

Example, infinite Construction

11 12 22 13 23 33

π1

1 1π1

π#

1

π1

2

π2

2 2π2

π#

2

π1

3

π2

3

π3

3 3π3

π#

3

2τ3 2τ ′ 3

2π3 2π′ 3 2π′′ 3

1τ2 1τ ′ 2 1τ3 1τ ′ 3

1π2 1π′ 2 1π′′ 2 1π3 1π′ 3 1π′′ 3

τ1 τ2 τ3

p q r

Goltz, Nestmann, Peters, Schicke Bamberg, March 2010

slide-27
SLIDE 27

Introduction and Basic Notions Distributed Systems Synchronous Interaction and Distribution Structural Conflict Nets 25 / 38

Technical Details, finite Construction

◮ New compression method for Petri net images via

unification of elements by name.

◮ Macros emulating reverse firing transitions.

Nonetheless:

◮ Easily five times the elements (without macro expansion) ◮ Needs more than A4 when printed

We do not have a correctness proof yet.

Anybody knows a publisher where we can do A1? Bamberg, March 2010

slide-28
SLIDE 28

Introduction and Basic Notions Distributed Systems Synchronous Interaction and Distribution Structural Conflict Nets 26 / 38

Structural Conflict Nets and Swapping Equivalence

◮ What is a good concept of causality in not one-safe nets? 1 2 a b 4 3 c 5 1 2

a b

4 4

c

3 5 1 2

a b

4 4

c

3 5

Goltz, Nestmann, Peters, Schicke Bamberg, March 2010

slide-29
SLIDE 29

Introduction and Basic Notions Distributed Systems Synchronous Interaction and Distribution Structural Conflict Nets 27 / 38

Swapping Equivalence

◮ Swap outgoing arcs of equally mapped places within the

same cut. [Best, Devillers]

◮ But: Only a single process for the following net: a b c d ◮ Not a problem in structural conflict nets

Goltz, Nestmann, Peters, Schicke Bamberg, March 2010

slide-30
SLIDE 30

Introduction and Basic Notions Distributed Systems Synchronous Interaction and Distribution Structural Conflict Nets 28 / 38

Further Research

◮ Conjecture: Impossibility result for linear time causal

semantics

◮ Comparison of our results with those on process algebras ◮ Application to modelling languages: What are suitable

languages for specifying distributed systems?

◮ Application to synthesis of asynchronous circuits and

multithreaded programming

see also: Symmetric and Asymmetric Asynchronous Interaction, ICE’08, ENTCS, Vol. 229, Issue 3, 2009, p. 77–95 On Synchronous and Asynchronous Interaction in Distributed Systems, MFCS’08, LNCS 5162, 2008, 16–35 Goltz, Nestmann, Peters, Schicke Bamberg, March 2010

slide-31
SLIDE 31

Introduction and Basic Notions Distributed Systems Synchronous Interaction and Distribution Structural Conflict Nets 29 / 38

Synchronous and Asynchronous π-calculus

◮ Syntax of Synchronous π-calculus:

P ::=

  • i

αi.Pi

  • ν z (P)
  • P1|P2
  • !P

where α ::= xy

  • x(z)
  • τ

◮ Syntax of Asynchronous π-calculus:

P ::= xy.0

  • i

αI

i.Pi

  • ν z (P)
  • P1|P2
  • !P

where αI ::= x(z)

  • τ

Goltz, Nestmann, Peters, Schicke Bamberg, March 2010

slide-32
SLIDE 32

Introduction and Basic Notions Distributed Systems Synchronous Interaction and Distribution Structural Conflict Nets 30 / 38

Result of Palamidessi [2]

”A natural question arises, then, wheter or not it is as expressive as the full π-calculus. We show that this is not the case.” ”[. . . ] there does not exist any uniform, fully distributed translation from the π-calculus into the asynchronous π-calculus, up to any ’reasonable’ notion of equivalence.”

◮ Counterexample: symmetric solution of leader election ◮ Uniform: [

[ P | Q ] ] = [ [ P ] ] | [ [ Q ] ] and [ [ σ (P) ] ] = θ ([ [ P ] ])

◮ Reasonable: preserving the relevant observables and

termination properties

Goltz, Nestmann, Peters, Schicke Bamberg, March 2010

slide-33
SLIDE 33

Introduction and Basic Notions Distributed Systems Synchronous Interaction and Distribution Structural Conflict Nets 31 / 38

Asynchronous Solution of Leader Election

◮ Case of two processes:

P1 = x.1 + y.2 P2 = y.2 + x.1 synchronous, symmetric, distributed Q1 = x | x.1 + y.2 ν l

  • l | l.
  • x | 1
  • + y.2

Q2 = y | y.1 + x.2 | l.

  • y | 2
  • + x.1
  • asynchronous, distributed?

asynchronous, symmetric?

Goltz, Nestmann, Peters, Schicke Bamberg, March 2010

slide-34
SLIDE 34

Introduction and Basic Notions Distributed Systems Synchronous Interaction and Distribution Structural Conflict Nets 32 / 38

Asynchronous Solution of Leader Election

◮ Case of n processes (weak distributed version):

P1 | . . . | Pn where for 1 ≤ i ≤ n Pi = xi |xi.  

n−1

  • 1

yi |  

n

  • j=1,j=i

yj   .1 +  

n

  • j=1,j=i

αj   .#z   +

n

  • j=0,j=i

 xj.  

n−1

  • 1

zi |  

n

  • k=1,k=i

αk   .#z + 1     with αi ∈ { yi, zi } for all i ∈ [1, n],

n

  • j=1,j=i

αj is α1. . . . αi−1.αi+1. . . . αn and #z in ˜ α.#z is the number of zi in ˜ α

Goltz, Nestmann, Peters, Schicke Bamberg, March 2010

slide-35
SLIDE 35

Introduction and Basic Notions Distributed Systems Synchronous Interaction and Distribution Structural Conflict Nets 33 / 38

Asynchronous Solution of Leader Election

◮ Case of n processes (weak symmetric version):

ν l

  • l | P1 | . . . | Pn
  • where for 1 ≤ i ≤ n

Pi = l. n

  • i=1

x (i)

  • | x(z).z

Goltz, Nestmann, Peters, Schicke Bamberg, March 2010

slide-36
SLIDE 36

Introduction and Basic Notions Distributed Systems Synchronous Interaction and Distribution Structural Conflict Nets 34 / 38

Asynchronous Solution of Leader Election

◮ Case of two processes:

P1 = x.1 + y.2 P2 = y.2 + x.1 synchronous, symmetric, distributed Q1 = x | x.1 + y.2 ν l

  • l | l.
  • x | 1
  • + y.2

Q2 = y | y.1 + x.2 | l.

  • y | 2
  • + x.1
  • asynchronous, distributed?

asynchronous, symmetric?

Goltz, Nestmann, Peters, Schicke Bamberg, March 2010

slide-37
SLIDE 37

Introduction and Basic Notions Distributed Systems Synchronous Interaction and Distribution Structural Conflict Nets 35 / 38

Absolute vs. Relative Expressive Power [3, 1]

Absolute Expressive Power

◮ studying which problems can be solved ◮ identify problems that can be solved in a language under

some conditions that cannot be met by any solution in another language

Relative Expressive Power

◮ encode one language in the other and studying the

properties of the encoding function

◮ encoding function must preserve the ’essence’ of the

translated term

Goltz, Nestmann, Peters, Schicke Bamberg, March 2010

slide-38
SLIDE 38

Introduction and Basic Notions Distributed Systems Synchronous Interaction and Distribution Structural Conflict Nets 36 / 38

What means fully distributed?

◮ parallel composed processes ◮ without coordinator processes ◮ requirement [

[ P | Q ] ] = [ [ P ] ] | [ [ Q ] ] ensures that the translation maintains the degree of distribution [2]

◮ explicit notion of localities

◮ encoding function must preserve localities ◮ restrict communication between localities

◮ . . .

Goltz, Nestmann, Peters, Schicke Bamberg, March 2010

slide-39
SLIDE 39

Introduction and Basic Notions Distributed Systems Synchronous Interaction and Distribution Structural Conflict Nets 37 / 38

What means behavioral equivalent?

◮ (relevant) (output) barbs (modulo τ-steps) ◮ completed traces (modulo τ-steps and modulo equivalent

traces)

◮ translated traces matches the original ones ◮ translated traces fulfill a specific condition appropriate to

the problem

◮ deadlock, livelock, divergence ◮ operational correspondence: the encoding function

preserves the essentials of an reduction relation

◮ fully abstract: equivalent processes are mapped to

equivalent processes

◮ requires an equivalence whose definition can be different

  • n the languages

◮ . . .

Goltz, Nestmann, Peters, Schicke Bamberg, March 2010

slide-40
SLIDE 40

Introduction and Basic Notions Distributed Systems Synchronous Interaction and Distribution Structural Conflict Nets 38 / 38

References

Daniele Gorla. Comparing Communication Primitives via their Relative Expressive Power. Information and Computation, 206(8):931–952, 2008. Catuscia Palamidessi. Comparing the Expressive Power of the Synchronous and the Asynchronous π-calculi. Mathematical Structures in Computer Science, 13(5):685–719, 2003. Joachim Parrow. Expressiveness of Process Algebras. Electronic Notes in Theoretical Computer Science, 209:173–186, 2008.

Goltz, Nestmann, Peters, Schicke Bamberg, March 2010