Chapter 6: Ambient Calculus - PowerPoint PPT Presentation

About This Presentation
Title:

Chapter 6: Ambient Calculus

Description:

Chapter 6: Ambient Calculus Programming Distributed Computing Systems: A Foundational Approach Carlos Varela Rensselaer Polytechnic Institute C. Varela – PowerPoint PPT presentation

Number of Views:75
Avg rating:3.0/5.0
Slides: 13
Provided by: Rich2151
Learn more at: http://wcl.cs.rpi.edu
Category:

less

Transcript and Presenter's Notes

Title: Chapter 6: Ambient Calculus


1
Chapter 6 Ambient Calculus
  • Programming Distributed Computing Systems A
    Foundational Approach
  • Carlos Varela
  • Rensselaer Polytechnic Institute

2
Mobile Ambients
  • Locations represented by a topology of boundaries
  • Not identified with globally vague names
  • Process mobility represented as crossing of
    boundaries
  • Not as communication of processes or process
    names over channels
  • Security represented as ability/inability to
    cross boundaries
  • Interaction between processes is by shared
    location within a common boundary

3
Mobile Ambients
  • n names
  • P,Q processes
  • (n)P
  • 0
  • P Q
  • !P
  • nP
  • M.P
  • M capabilities
  • in n
  • out n
  • open n

4
Entry Capability
  • n in m.P Q m R
  • m n P Q R
  • n m m

in m.P Q
R
n
R
P Q
5
Exit Capability
  • m n out m.P Q R
  • n P Q m R
  • m n m

n R
P Q
R

out m.P Q
6
Open Capability
  • open m.P m Q
  • P Q
  • open m.P P Q

m
Q
7
Subjective/Objective Moves
  • Subjective moves
  • n in m.P Q m R m n P Q
    R
  • m n out m.P Q R m R n
    P Q
  • open m.P m Q P Q
  • Objective moves
  • mv in m.P m R m P R
  • m mv out m.P R P m R
  • Ambient I/O
  • (x).P input
  • ltxgt output

8
Encoding Objective MovesWith Subjective Moves
  • allow n !open n
  • mv in n.P (k) k in n.enter out k.open k.P
  • mv out n.P (k) k out n.exit out k.open k.P
  • n P n P allow enter
  • n P n P allow exit
  • n P n P allow enter allow
    exit

9
Exercises
  • Prove
  • mv in n.P n Q n P Q
  • n mv out n.P Q n Q P

10
Reference Cell
  • cell c w c ltwgt
  • get c (x).P mv in c.(x).(ltxgt mv out c.P)
  • set cltwgt.P mv in c.(x).(ltwgt mv out c.P)

11
Mutual Exclusion
  • acquire n.P open n.P
  • release n.P n P
  • acquire l.P release l.Q open l.P l Q
  • P 0 Q P Q

12
Dining Philosophers
  • phil l r !(acquire l.acquire r.(release l
    release r))
  • fork f release f
  • 2-table phil f1 f2 phil f2 f1 fork f1
    fork f2
  • 2-table-nd phil f1 f2 phil f1 f2 fork f1
    fork f2
  • 3-table phil f1 f2 phil f2 f3 phil f3 f1
  • fork f1 fork f2 fork f3
Write a Comment
User Comments (0)
About PowerShow.com