Shared Variables Interaction Diagrams - PowerPoint PPT Presentation

About This Presentation
Title:

Shared Variables Interaction Diagrams

Description:

Interaction Diagrams Radu Grosu State University of New York at Stony Brook joint work with Rajeev Alur University of Pennsylvania – PowerPoint PPT presentation

Number of Views:50
Avg rating:3.0/5.0
Slides: 26
Provided by: Dr231988
Category:

less

Transcript and Presenter's Notes

Title: Shared Variables Interaction Diagrams


1
Shared Variables Interaction Diagrams
  • Radu Grosu
  • State University of New York at Stony Brook
  • joint work with
  • Rajeev Alur
  • University of Pennsylvania

2
Motivation
  • Scenario-based specifications are very popular in
    concurrent systems development
  • intuitive description of design requirements,
  • intuitive presentation of system executions,
  • compact presentation test sequences.

3
Fact
  • Concurrent systems are usually constructed around
    one of the following communication models
  • Shared variables
  • Message passing

4
Message Passing
  • standardized notation in form of MSCs (UML-SDs)
  • precise semantics subjected to analysis,
  • algorithms and tools (race conditions, timing
    conflicts)

5
Shared Variables?
  • No formal notation so far!
  • but plenty informal diagrams

6
In This Work
  • Define Shared Variables Interaction Diagrams
    (SVID)
  • introduce the notion of consistent SVID,
  • analyze complexity of consistency checking
  • many-to-many communication
  • one-to-many communication
  • Define refinement notion between SVIDs
  • intuitive syntactic refinement steps,
  • analyze complexity of refinement checking
  • many-to-many communication
  • point-to-point communication

7
Peterson Mutual Exclusion Protocol
p1
p2
p1
p2
ini
f2F
idle
f1 T p1 wants to enter critical section f2 T
p2 wants to enter critical section t 1 p1 has
priority
8
Processes
p1
p2
p1.Xr f2 - read variables p1.Xs t
- write shared variables p1.Xe f1 - write
exclusive variables p1.Xw t,f1 - write
variables p1.X t,f1,f2 - all variables
9
Vertices
p2
p1
v11
v21
v12
v22
v13
v23
v24
v14
10
Vertices
p2
p1
v11
v21
linear order time flow
idle
v1i.p p1 p1.V v11,v12,v13,v14 V p1.V ?
p2.V lt ltp1 ? ltp2
v12
v22
v13
v23
v24
f1
v14
ltp1
11
Atomic Update Boxes
p1
p2
f1F
f2F
f2T t 1
v12
v13
f1
12
Read Edges
p1
p2
no intervening vertex writes t
v22
v12
partial order among vertices
v13
v23
v24
f1
13
Consistent SVID
There is a sequence v1 v2 vn that (1) is
consistent with time order lt (2) is consistent
with read order E (3) respects most recent
updates.
14
Inconsistent SVID
p1
p1
v11
v21
v12
v22
15
Checking Consistency
One-to-many communication (write exclusive) -
Solved in linear time. - Reduces to finding a
cycle in a graph. Many-to-many communication
(write shared) - In general NP complete. -
Resolving implicit dependencies -gt backtrack.
16
Refinement
  • When does I refine S written I ? S?
  • Interested in a refinement notion that has a
    syntactic counterpart that guides users.
  • Three simple ways to refine an SVID
  • - By moving arrows and adding empty boxes.
  • By splitting vertices.
  • By splitting processes.

17
Moving Arrows Adding Empty Boxes
18
Splitting Vertices
19
Splitting Processes
?
20
Refinement
  • When does I refine S written I ? S?
  • Variables S.X I.X
  • Processes p.X ? q.X or p.X ? q.X
  • Boxes there is a surjective map r form the
    vertices I to the vertices of S that preserves
    the variables.
  • Dependency The specification partial order (S.E
    ? S.lt) is included in the image r(I.E ? I.lt).

21
Checking Refinement
p2
p2
p1
t
p1
?
f1
f1
22
Checking Refinement
Point-to-point communication - Solved in
O(V3). - Reduces to computing the transitive
closure. Many-to-many communication - In
general NP complete. - Guessing the vertex map -gt
backtrack.
23
Deadlock for Dining Philosophers
24
Deadlock for Dining Philosophers
p1
f3
p2
f1
f2
p3
set(F)
set(F)
set(F)
get
get
get
val(F)
val(F)
val(F)
set(T)
set(T)
set(T)
get
get
val(T)
val(T)
get
val(T)
25
Wrap Up
  • Defined Shared Variables Interaction Diagrams
    (SVID)
  • introduced the notion of consistent SVID,
  • analyzed complexity of consistency checking
  • many-to-many communication
  • one-to-many communication
  • Defined refinement notion between SVIDs
  • intuitive syntactic refinement steps,
  • analyzed complexity of refinement checking
  • many-to-many communication
  • point-to-point communication
Write a Comment
User Comments (0)
About PowerShow.com