Upload
belen-henton
View
217
Download
2
Tags:
Embed Size (px)
Citation preview
Wave Technology
2
Table of Contents
A. IntroductionB. Getting Started with WAVE ProgrammingC. The WAVE LanguageD. RulesE. Basic Space Navigation Mechanisms in WAVEF. Graphical representation of wave: SPREAD
DIAGRAMSG. Wave and sequential programmingH. Modeling inter-process communications
3
Table of Contents
A. IntroductionB. Getting Started with WAVE ProgrammingC. The WAVE LanguageD. RulesE. Basic Space Navigation Mechanisms in WAVEF. Graphical representation of wave: SPREAD
DIAGRAMSG. Wave and sequential programmingH. Modeling inter-process communications
Session 1: Introduction
Introduction
• Wave is a special model, language and technology for highly parallel, distributed and cooperative systems.
• Originally designed for dealing with virtual worlds represented as dynamical Knowledge Networks.
• Based on recursive programs (waves) spreading, replicating, and splitting in active dynamic knowledge networks.
Wave Technology
• Wave Language• Wave Interpreter• Interface to the Internet (UDP/IP)• Interface to Unix (Solaris/Linux)• A good collection of applications
WAVE Architecture in Networks
WAVE Kernel
UDP/IP
WAVE Protocol
UNIX OS
WAVE Interpreter (NI)
NI
NI
Network
Wave Technology• Maps the Internet into a simple, seamless,
productive global info infrastructure (middleware)
• Allows rapid development of cooperative, distributed applications over the info infrastructure
WAVE Knowledge Network
Physical Network (Internet)
WAVE Applications
Layered Organization of WAVE
WAVE Application Layer
Dynamic Track Layer
Knowledge Network Layer
Network (Internet) Layer
Wave Salient Features
• Cooperative, distributed activities (programming)
• Spatial navigation with high parallelism • Dynamic distributed control• High-level abstraction (Free from
implementation details)• Operating with information and physical
systems
ApplicationsComputing grid
Intelligent networks
Service & security management
Traffic management (Data, Road and Air)
Distributed gaming
Distributed robotics
Distributed simulation (e.g. battle-field)
Applications
12
Table of Contents
A. IntroductionB. Getting Started with WAVE ProgrammingC. The WAVE LanguageD. RulesE. Basic Space Navigation Mechanisms in WAVEF. Graphical representation of wave: SPREAD
DIAGRAMSG. Wave and sequential programmingH. Modeling inter-process communications
Session 2: Getting Started with WAVE Programming
Creation of elementary networks
• Creating a single node:CREATE ( DIRECT # a )
Short: CR (@#a)
a
CR(@#a)
Creation of elementary networks
• Adding node b connected to node a by an unoriented link p:DIRECT # a. CREATE ( p # b )
Short: @#a.CR(p#b)
CR(p#b)
p
b
@#a.CR(p#b)a
Creation of elementary networks
• Adding node c connected to node a by an oriented link p:DIRECT # a. CREATE ( +q # c )
Short: @#a.CR(+q#c)
CR(+q#c)
q
c
@#a.CR(+q#c)a
Creation of elementary networks
• Incremental creation of the entire network by an integral templateCREATE ( DIRECT # a. p # b, + q # c )
Short: CR ( @#a. p#b, +q#c )
aCR ( @#a. p#b, +q#c )
p
b
CR (p#b)
c
CR (+q#c)
q
Elementary data retrieval from a network
• Printing neighbors of node a in parallel on different terminalsDIRECT #a. ANY # ANY. TERMINAL = CONTENT
Short: @#a. #. T = C
a @#a. #, T=C
p
b
#.T=C
c
#.T=C
q
T=CT=C
b c
Terminal 1 Terminal 2
• Returning results to node a before printingDIRECT #a. ANY # ANY. Ftransit = CONTENT. LINK #
PREDECESSOR. TERMINAL = FtransitShort: @#a. #.F=C.L#P.T=F
a@#a. #.F=C.L#P.T=F
p
b
#.F=C.L#
P.T=F
c
#.F=C.L#P.T=F
q
T=CT=C
L#P.T=FF=b
L#P.T=FF=c
T=FT=F
bc
Terminal
Elementary data retrieval from a network
Collecting distributed data in one list
• Collecting neighbors into a single list with its subsequent printing
DIRECT # a.SEQUENCE (
( ANY # ANY. Ftransit = CONTENT.Link # PREDECESSOR. Nlist & Ftransit
),TERMINAL = Nlist
)
Short: @#a. SQ( (#. F=C. L#P. N&F), T=N )
@#a. SQ( (#. F=C. #P. N&F), T=N )
a
c
2
1
b
SQ
F=CF=C @#a.SQ((#.F=C.#P.N&F), T=N
SQ((#.F=C.#P.N&F), T=N#.F=C.#P.N&F #.F=C.#P.N&F
F=C.#P.N&FF=C.#P.N&F
F = cF = b
#P.N&F#P.N&F
N&FN&F
T= NT = N
Terminal
b, c
Procedures as network nodes
• Fprocedure = {DIRECT # a. ANY # ANY. TERMINAL = CONTENT
}.CREATE ( DIRECT # Fprocedure ).DIRECT # b;c. CREATE ( f # PREDECESSOR )
Short: Fp = {@#a. #. T=C}. CR(@#Fp). @#b;c. CR(f#P)CR(@#{@#a. #. T=C}). @#b;c. CR(f#P)
Procedures as network nodes• CR(@#{@#a. #. T=C}). @#b;c. CR(f#P)• Activating the procedure:
DIRECT # c. f # ANY. ^CONTENTShort: @#c. f#. ^C
a
b c
@#a.#.T=C
@#c.f#.^C
f#. ^C
^Cf
f
@a.#.T=C
#.T=C #.T=C
T=CT=C
Teminal 1Teminal 2
b c
Creating arbitrary networksCREATE (
DIRECT # b. Freturn = ADDESS.s # d.( r # a. P # Freturn),( t # c. q # Freturn )
)
CR(@#b. F=A.s#d. (r#a.p#F), (t#c.q#F))
a
b
c
p
s
q
tr
d
Creating arbitrary networksCR(@#b. F=A.s#d. (r#a.p#F), (t#c.q#F))
d
a
b
c
p
s
q
tr
CR(@#b. F=A.s#d. (r#a.p#F), (t#c.q#F))
CR(s#d. (r#a.p#F), (t#c.q#F))F = [b]
F = A
CR(r#a.p#F)F = [b]
CR(r#a.p#F)F = [b]
CR(p#F)F = [b]
CR(p#F)F = [b]
Following a path in a network
• Following an explicit path in the networkDIRECT # a.P # ANY. q # ANY. S # ANY.TERMINAL = CONTENT
Short: @#a. p#. q#. s#. T =C
d
a
b
c
p
s
q
tr
@#a.p#.q#.s#.T=Cp#.q#.s#.T=C
q#.s#.T=C
s#.T=C
T=C
Terminal
27
Table of Contents
A. IntroductionB. Getting Started with WAVE ProgrammingC. The WAVE LanguageD. RulesE. Basic Space Navigation Mechanisms in WAVEF. Graphical representation of wave: SPREAD
DIAGRAMSG. Wave and sequential programmingH. Modeling inter-process communications
Session 3: The WAVE Language
Main knowledge network components
18Peter Mary
John
loves agea1a1
a1
a1
Node
Absolute node addresses
friends
Nonoriented links
Oriented links
Individual node & link names (contents)
Syntax• WAVE {{Move,}.}• Move Dat Op Dat | [Rule] (WAVE)• Rule SQ | OS | OP | AS | AP | RP | WT |
ID |CR | RL• Dat {string;} | N {L_D} | f {L_D} | C | A | P
| S | T• Op # | ## | ~ | /~ | == | /= | < | <= | > |
>= | ! | ^ | = | + | - | * | / | & | : | :: | | | % | ?
31
Table of Contents
A. IntroductionB. Getting Started with WAVE ProgrammingC. The WAVE LanguageD. RulesE. Basic Space Navigation Mechanisms in WAVEF. Graphical representation of wave: SPREAD
DIAGRAMSG. Wave and sequential programmingH. Modeling inter-process communications
Session 4: Rules
33
Rules
• Branching Rules• Repetition• Wait• Protecting Shared Resources• Create• Release• Synchronized Versus Nonsynchronized Rules
34
Rules
• BRANCHING RULES• Repetition• Wait• Protecting Shared Resources• Create• Release• Synchronized Versus Nonsynchronized Rules
Branching Rules
• SEQUENCE (SQ)• OR_SEQUENTIAL (OS)• AND_SEQUENTIAL (AS)• OR_PARALLEL (OP)• AND_PARALLEL (AP)• RANDOM (RD)
SEQUENCE (SQ)
SN R1
SN R2
SN R3
Start
w1w2 w3
Sequential: SQ( w1. w2. w3 )
SEQUENCE (SQ)F = 3. SQ ( F – 5, F + 2. T = F )
F = 3
SQ ( F – 5, F + 2. T = F )
SQ ( ( F – 5. T = F ), ( F + 2, T = F ) )
F – 5. T = F
F = 3 – 5 = -2 PRINT: -2F + 2. T = F
F = 3 + 2 = 5 PRINT: 5
SEQUENCE (SQ)F = 3. SQ ( F – 5, F + 2). T = F
F = 3
SQ ( F – 5, F + 2). T = F
SQ ( F – 5, F + 2 )
F – 5
F = 3 – 5 = -2
PRINT: -2
F + 2. T = F
F = 3 + 2 = 5
PRINT: 5
PRINT: 5
PRINT: -2
OR_SEQUENTIAL (OS)
SN R2
SN R4
Start
w2w4
OR_SEQUENTIAL(w1, w2, w3); w4
w1
w3
SN R3
OR_SEQUENTIAL (OS)
OR_SEQUENTIAL ( ( N == 1. p # b ), STAY ). N + 5
AND_SEQUENTIAL (AS)
Start
AND_SEQUENTIAL(w1, w2, w3)
w1
FALSE
AND_SEQUENTIAL (AS)N = { + #. Nn > 0 }; { #. T = C }
AND_SEQUENTIAL ( ^N )
OR_PARALLEL (OP)
SN R2
SN R4
Start
w2w4
OR_PARALLEL(w1, w2, w3); w4
w1
w3
SN R3
TRUETRUE
OR_PARALLEL (OP)
Start
w2
OR_PARALLEL(w1, w2, w3); w4
w1
w3
FALSEFALSE
FALSE
FALSE
AND_PARALLEL (OP)
SN R2
SN R4
Start
w2w4
AND_PARALLEL(w1, w2, w3); w4
w1
w3
SN R3
FALSE
AND_PARALLEL (AP)
SN R2
SN R4Start
w2w4
AND_PARALLEL(w1, w2, w3); w4
w1
w3
SN R3 TRUE
TRUE
SN R1
TRUE
TRUE
SN R4
SN R4
w4
w4
AND_PARALLEL (AP)
AND_PARALLEL ( ANY # ANY. Ntest == None ). ^Ftail
RANDOM (RN)RN ( @ #. N12 + 100 )
49
Rules
• Branching Rules• REPETITION• Wait• Protecting Shared Resources• Create• Release• Synchronized Versus Nonsynchronized Rules
RepetitionREPEAT ( + ANY # ANY ). TERMINAL = CONTENT
N = 2. REPEAT ( N /= 5 )
51
Rules
• Branching Rules• Repetition• WAIT• Protecting Shared Resources• Create• Release• Synchronized Versus Nonsynchronized Rules
Wait
WAIT ( DIRECT # ANY. NN = 1. F = 2 ). wave_re
53
Rules
• Branching Rules• Repetition• Wait• PROTECTING SHARED RESOURCES• Create• Release• Synchronized Versus Nonsynchronized Rules
54
Rules
• Branching Rules• Repetition• Wait• Protecting Shared Resources• CREATE• Release• Synchronized Versus Nonsynchronized Rules
55
Rules
• Branching Rules• Repetition• Wait• Protecting Shared Resources• Create• RELEASE• Synchronized Versus Nonsynchronized Rules
56
Rules
• Branching Rules• Repetition• Wait• Protecting Shared Resources• Create• Release• Synchronized Versus Nonsynchronized Rules
RulesSummary:• Rules are important in WAVE• Branching Rules: SQ, OS, AS, OP, AP, RN• Repetition, Wait, Protecting Shared
Resources (INDIVISIBLE), Create, Release are usually used in WAVE and Synchronized Versus Nonsynchonized help us more understand about rules.
58
Table of Contents
A. IntroductionB. Getting Started with WAVE ProgrammingC. The WAVE LanguageD. RulesE. Basic Space Navigation Mechanisms in WAVEF. Graphical representation of wave: SPREAD
DIAGRAMSG. Wave and sequential programmingH. Modeling inter-process communications
Session 5: Basic Space Navigation Mechanisms in WAVE
Breath-First Parallel Spread
• Start in some node as a current node• Repeat from all current nodes:
– If the current node is not marked, mark it• Otherwise, halt this branch
– Hop through all links (broadcast) to neighboring nodes (excluding the predecessor node from which the current node has been reached)
– Every node reached becomes a current node
Exemplary network topology
c
b
a t
e
g
c
b
d
a t
e
gr
p q
t
s
s
u
q
p
Repetitive SpreadDIRECT # c.REPEAT (
INDIVISIBLE (Node_mark == NONE. Node_mark =1).TERMINAL = CONTENT.ANY ## ANY
) c
bd
a t
e
g
rt s
qp
q
Recursive Spread
Fbreadth_spread = { INDIVISIBLE ( Node_mark==NONE. Node_mark =
1) .TERMINAL = CONTENT .ANY # ANY .^ Fbreadth_spread}.DIRECT # c.^ Fbreadth_spread
Limited Depth SpreadDIRECT # a . Fdepth_limit = 2 .REPEAT (
Fcurrent_depth + 1 .Fcurrent_depth <= Fdepth_limit .INDIVISIBLE ( Node_mark == NONE. Node_mark
= 1) .TERMINAL = CONTENT .ANY # ANY
)
c
e
t s
d d
q
Spread Through All LinksDIRECT # c.REPEAT (
OR_SEQUENTIAL (INDIVISIBLE (
Node_mark == NONE. Node_mark = 1 .TERMINAL = LINK) ,( PREDECESSOR > ADDRESS . TERMINAL = LINK. DONE !)
) .ANY ## ANY
)
Evolent Spread
o Start in some node as a current nodeo Repeat from all current nodes:
– If the current node is not in the mobile list–Append the node's name to the mobile list
• Otherwise, halt this branch– Broadcast to all neighboring nodes (excluding
the predecessor node)– Every node reached becomes a current node
Repeatitive spread
DIRECT # c .REPEAT (
CONTENT /~ Fpassed_nodes .Fpassed_nodes & CONTENT .TERMINAL = CONTENT .ANY ## ANY
)
Evolvent tree
c
d b e
b a d a g t
a b a d f g
t sq
s r s p p q
p p r ru u
Parallel Breadth First Synchronous Spread
• Start in some node as a current node• Repeat from all current nodes
– Wait for full completion of the following processes• If the current node is not marked, mark it
–Otherwise, halt this branch• Hop through all links (broadcast) to
neighboring nodes (excluding the predecessor node)
• Every node reached become a current node
Using Nested Rules
Fnext = { TERMINAL = CONTENT . ANY ## ANY . INDIVISIBLE ( Node_mark == NONE. Node_mark = 1 )} .DIRECT # c. Node_mark = 1 .WAIT (
...WAIT ( ^Fnext). ^Fnext...
). ^Fnext). ^Fnext
Breadth-first synchronous spread
Step 1
Step2
c
d b e
a g t
t q s
p p q
Sequential breadth-first, or spiral, spread
spiral
c
d b e
a g f
t q s
p p q
Depth-First Sequential Spread
• Define the depth-first spread procedure as:– If current node is not marked, mark it, otherwise halt– Do the following sequentially for all links in the current node:
• Hop through a new link to a new current node• Activate the depth-first spread procedure
– Start in node c– Activate the depth-first spread procedure
Fdepth_first_spread ={ INDIVISIBLE ( Node_mark == NONE.
Node_mark = 1 ) . TERMINAL = CONTENT . SEQUENCE (ANY # ANY. ^Fdepth_first_spread
)} .DIRECT # c. ^Fdepth_first_spread
c
d e
a
b
g
t
SQ
SQ
SQ
SQ
SQ
SQ
SQ
t
r
p
s q
q s
pu
q
qs
Fig. 4.8. Depth-first sequential spread
CONTINUOUS SPREAD
LOOPING MODE• Start in some node and set up a marking color• Repeat from the starting node• Do the two steps sequentially from the starting node, which
is also a current node:1. Repeat from all current nodes
If the current node is not marked with the color, mark it with the colorHop through all links (broadcast) to neighboring nodes (excluding the predecessor node)Every node reached becomes a current node
2. Make a delay in the starting node and change the color
c
d e
a g t
t …
r …n ... … q
q
… s
b
Continuous spread
Pipeline Mode
• Define the pipeline spread procedure as:– Set up a new, stronger, spread color– Do the following two parts independently and in
parallel1. Repeat from the current node
– If the current node’s mark is weaker than the spead color, mark the current node with the spread color, otherwise halt
– Broadcast though all links to neighboring nodes (except the predecessor node), each becoming current node
2. Activate the pipeline spread procedure after a delay
– Start in node c as a current node– Activate the pipeline spread procedure
79
Table of Contents
A. IntroductionB. Getting Started with WAVE ProgrammingC. The WAVE LanguageD. RulesE. Basic Space Navigation Mechanisms in WAVEF. Graphical representation of wave: SPREAD
DIAGRAMSG. Wave and sequential programmingH. Modeling inter-process communications
Session 6: Graphical representation of wave: SPREAD DIAGRAMS
Spread diagram
1. Basic Components:
SNR m Arbitrary move
AS
…
Rules and rule –
controller moves
1.1 Halts
Link Ni Fj Spatial variable
Spread diagram
2. Structuring:m1.m2,(m3.m4).m5
m1
m2 m3
m4
m1.(m2,(m3.m4)).m5
SNR1
SNR3
SNR2
m5
m1
SNR1m234
m2 m3
m4
SNR1*
SNR3*
SNR2*
SNR3m5
Spread diagram
3. More details:
F=N1
a#
N2=F
SNR0 N1
F
N1
F
N2
F
m1
SNR1
m2
SNR2
m3
F=N1.a#.N2=F(a)
m1
m2
SNR1
SNR2
m1..m2
(c)
m1
m2
m3
SNR1
SNR2
m1.m2,.m3
(d)
F>0
F=1
m4
SNR1
F
F
m2
SNR2
m3
SNR3
F=1.F>0.F!.=m4(b)
F!
m1
F
Spread diagram
4. Parallel processes in Distributed data:
m1 m3m2
SNR1
SNR3
SNR2
m4 m5
m1, m2,m3. m4, m5
m1 m3m2
SNR1
SNR3
(m1.m4, m5),(m2.m4,m5) , (m3.m4,m5)
m5 m4 m5 m4 m5m4
SNR21 SNR22 SNR23
m1
m2
m3
SNR0
SNR1
SNR2
SNR3
m1.m2.m3
m1
m2 m2 m2
m3SNR2
SNR3
m1.m2, m2,m2.m3
m1
m2 m2 m2
SNR3m1.(m2(m3,m3,m3)), (m2.(m3,m3,m3)), (m2.(m3,m3,m3))
m3 m3 m3 m3 m3 m3 m3 m3 m3
m1
OP
m1.OP(m2,m3.m4).m5
m2 m3
m4SNR2
SNR3
SNR4
SNR1
m5
m1
OP
m1.OP((m2.m4),(m3.m4)).m5
m2
m4
SNR21
SNR31
SNR4m5
m3
m4
SNR22
SNR32branch1 branch2
OP
m1
m4
m2
m4 m4
SNR31
m3
m4 m4 m4
SNR32
SNR4
m5
m1.OP((m2.m4,m4,m4), (m3.m4,m4,m4)).m5
Spread diagram
5. Example:
Knowledge Network
a
bc
p q
a a a …
b b b… c c c …
ENTRY
AS
AS
@#a
p#b q#c
m1
T=C.5?sleepm2
SNR1
CREATE(DIRECT#a.p#b,q#c,STAY).REPEAT(TERMINAL=CONTENT.5?sleep)
88
Table of Contents
A. IntroductionB. Getting Started with WAVE ProgrammingC. The WAVE LanguageD. RulesE. Basic Space Navigation Mechanisms in WAVEF. Graphical representation of wave: SPREAD
DIAGRAMSG. Wave and sequential programmingH. Modeling inter-process communications
Session 7: Wave and sequential programming
90
Wave and sequential programming
• Expressing a sequence of Statements• If-else Statements• Multiway Decisions• Loops
91
Wave and sequential programming
• EXPRESSING A SEQUENCE OF STATEMENTS• If-else Statements• Multiway Decisions• Loops
92
Expressing a sequence of Statements
• C languages1 ; s2 ; s3 ; s4
• Wave– Depth mode: period operator
s1 . s2 . s3 . s4
– Breadth mode: using SQ rule with comma seperator
SQ(s1, s2, s3, s4)
– Combination of the two
93
Expressing a sequence of Statements (2)
s1
s2
s3
s4s1 s2 s3 s4
SQ
s1.s2.s3.s4SQ(s1,s2,s3,s4)
94
Expressing a sequence of Statements (3)
s1
s2
s3
s4
SQ s1 s2
s3 s4
SQ
SQ
s1.SQ((s2.s3),s4) SQ(s1,(s2.SQ(s3,s4)))
95
Expressing a sequence of Statements (4)
s1 s2
s3
s4
SQ
1!s12 s1 s2 s3
s4
SQ
RN
(SQ(s1,(s2. 1!)).s3.s4)RN(SQ(s1, s2, s3)).s4
96
Wave and sequential programming
• Expressing a sequence of Statements• IF-ELSE STATEMENTS• Multiway Decisions• Loops
97
If-else Statements
e
s1
s2
OS
e
s2
s1
AS
OS
1!
OS(e . s1,s2 )OS(AS(e . 1! , s1),s2)
98
If-else Statements (2)
e
s1
OS
e
s1
WT
1!
e s1
SQ
1!
AS
SQ(AS(e , s1 . 1!), )WT(e . s1 . 1! , )OS(e . s1 , )
99
Wave and sequential programming
• Expressing a sequence of Statements• If-else Statements• MULTIWAY DECISIONS• Loops
100
Multiway Decisions
• else-if with filters
OS((e1 . s1) , (e2 . s2) , … , (em . sm) , sd )
e1 em
s1
OS
sm sd
……
101
Multiway Decisions (2)
• Else-if parallel version
e1 em
S1
OS
sm sd
……
RN
RN(OS(((e1 . s1) , (e2 . s2) , … , (em . sm)) , sd ))
102
Multiway Decisions (3)
• Else-if with AS rule
RN(OS(AS(e1 , s1) , … , AS(em , sm) , sd))
e1 sms1
RN
em
sd
OS
ASAS
……
103
Multiway Decisions (4)
• switch
N==c1 N==cm
s1
OS
sm sd
e
e . OS((N==c1 , s1) , … , (N==cm , sm) , sd)
104
Wave and sequential programming
• Expressing a sequence of Statements• If-else Statements• Multiway Decisions• LOOPS
105
Loops
• Most traditional types– while ( e ) s– do s while ( e )
• ‘For’ Statement– For (e1 ; e2 ; e3) s e1; while (e2) { s; e3 }
Repetition Expressing loops by
Recursion
106
Loops (2)
• Express using Repetition
p
RP
q
RP(p.q)
p
RP
q
AS
1!
RP(AS(p, (q . 1!))
p
RP
q
RN
AS
RP(RN(AS(p , q)))
107
Loops (3)
• Express using Recursion
q
^Nl
p
{ }Nl=
SQ
^Nl
Nl = {p . q . ^Nl} . SQ(^Nl , )
q
^Nl
p{ }Nl=
SQ
^Nl
AS
Nl = {AS(p , (q . ^Nl))} . SQ(^Nl , )
q
^Nl
p
{ }Nl=
^Nl
Nl = {p . q . ^Nl} .^ Nl
108
Loops (4)
‘For’ statement examples• C style: for (i = 0; i < n; i++) s += a[i]
• Ni = 1 . REPEAT (Ni <= Nn . Ns + Na : Ni . Ni + 1)• REPEAT ( Ni < Nn . Ni + 1 . Ns + Na : Ni)• Sequential programming in Wave: Nodal and
Frontal variables are the same!
109
Table of Contents
A. IntroductionB. Getting Started with WAVE ProgrammingC. The WAVE LanguageD. RulesE. Basic Space Navigation Mechanisms in WAVEF. Graphical representation of wave: SPREAD
DIAGRAMSG. Wave and sequential programmingH. Modeling inter-process communications
Session 8: Modeling inter-process communications
Modeling inter process communication
• Asynchronous data transfer• One-way synchronization• Bilateral rendezvous (two-way)• Sharing common resources
Modeling inter process communication
1. Asynchronous data transfer• Sender:head producing Nsender( Ftransit = Nsender.link # receiver.Nreceiver = Ftransit
)tail
• Receiver: any process using Nreceiver
Modeling inter process communication
1. Asynchronous data transfer
head
head.(Ft=Ns.l#r.Nr=Ft),tail
tail
Ft = Ns.l#r
Nr
Nr = Ft
any process using Nr
process
Ns
Modeling inter process communication
2. One-way synchronization• Sender:head producing Nsender( Ftransit = Nsender.
link # receiver.Nreceiver = Ftransit)tail
• Receiver: HeadREPEAT( Nreceiver == NONE).Tail consuming Nreceiver
Modeling inter process communication
2. One-way synchronization
head
tail
Ft = Ns.l#r
Nr
Nr = Ft
head
RP
tail
Nr ==
Ns Nr
Same location
head.(Ft=Ns.l#r.Nr=Ft),tail head.RP(Nr==).tail
Modeling inter process communication3. Bilateral rendezvous (two-way)• Sender:head producing NsenderREPEAT(Nbegin == NONE).( Ftransit = Nsender.link # receiver.Nreceiver = Ftransit
)tail• Receiver: Head(link # sender.Nbegin = 1),(REPEAT( Nreceiver == NONE).Tail consuming Nreceiver)
Modeling inter process communication
3. Bilateral rendezvous (two-way)head
tail
Ft = Ns.l#r
Nr
Nr = Ft
head
RP
tail
Nr ==Nr
Same location
RP
Nb ==
Ns
NbNs l#s
Nb
Nb = 1
Same location
head.RP(Nb==).(Ft=Ns.l#r.Nr=Ft),tail
head.(l#s.Nb=1),RP(Nr==).tail
Modeling inter process communication3. Sharing common resouces(head_1.INDIVISIBLE( working_with_a_common_resouce).tail_1),(head_2.INDIVISIBLE( working_with_a_common_resouce).tail_2),……(head_m.INDIVISIBLE( working_with_a_common_resouce).tail_m)
Modeling inter process communication
3. Sharing common resources
head 1
tail 1
ID
Working with a common resource
process 1
head m
tail m
ID
Working with a common resource
…
process m
Same location
120
THANKS FOR YOUR ATTENTION!