113 Views

Download Presentation
## Synchronization strategies for global computing models

- - - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - - -

**Ph.D. thesis discussion**Synchronization strategiesfor global computing models Ivan Lanese Computer Science Department University of Pisa (moved to Bologna) Supervisor: prof. Ugo Montanari**Roadmap**• Global computing • Comparing models for GC • Parametric synchronizations with mobility • Observational semantics and compositionality • Conclusions**Roadmap**• Global computing • Comparing models for GC • Parametric synchronizations with mobility • Observational semantics and compositionality • Conclusions**What is global computing?**• Essentially networks deployed on huge areas • Global computing systems quite common nowadays • Internet, wireless communication networks, overlay networks …**Features of global computing systems**• Distribution • Localities may have a semantic meaning • Heterogeneity • Interoperability, coordination • Mobility • Openness • Reconfigurability • Non-functional requirements**Formal methods for GC**• Building models of the system • Old aims • Concentrate on a particular aspect • Abstract from details • Analyze the properties of the system before building it • But new approaches/tools must be used • Mobility and non-functional requirements must be modeled explicitly • Need for compositionality • Need for more abstraction**High level models**• Models of coordination among components • Components interact via interfaces • Declarative specification of synchronization constraints • Possible evolutions derived as solution of system of constraints • Single components may be complex • We need powerful primitives • Multiple synchronizations • Abstractions of full protocols**Roadmap**• Global computing • Comparing models for GC • Parametric synchronizations with mobility • Observational semantics and compositionality • Conclusions**Why comparing models?**• Different models for GC exist • Process calculi, graphs, UML, categorical models… • Each model has strengths and weaknesses • Compare models to • Find strengths and weaknesses • Combine the strengths • Categorize them • Move some steps toward a (maybe) unique model**Which comparisons?**• N models → 2N comparisons • Must select some representatives • Show at a first sight some interesting connections • We have chosen • Logic programming • A graph transformation framework: SHR • A process calculus: Fusion Calculus**Logic programming**• Traditionally language for AI and problem solving • In the GC scenario seen as goal rewriting framework • Unification as synchronization primitive • Focus on partial computations**NOOO!!!**Long background on SHR**Very short background on SHR**• Graph transformation formalism • Productions specify the behaviour of edges • Synchronization via actions on common nodes • Hoare, Milner • Mobility by creating, sending and merging nodes**Fusion Calculus**• Calculus for mobility inspired by π-calculus • Input prefix is not a binder • When input and output interact a name fusion is generated • The scope of the fusion is determined by an explicit scope operator • Symmetric input/output • Arbitrary fusions allowed • Input of π-calculus obtained as input+scope • Not fully abstract since more powerful contexts are available**Hoare SHR vs logic programming**• Hoare synchronization strictly related to unification • Strong relation between Hoare SHR and Synchronized Logic Programming • A subset of logic programming • No nested functions • Transactional application of many clauses • Exploits function symbols for synchronization • Similar to tokens in zero-places of zero-safe nets**Summary of the comparison**Hoare SHR SLP Graph Goal Hyperedge Atom Node Variable Parallel comp. AND comp. Action Function sym. Production Clause Transition Transaction**An example**y y C(x,y)←C(x,z),C(z,y) C C x z C x r<w> y y C(r(x,w),r(y,w))←S(y,w) C S w x x r<w>**C**C C x C S C C C C C C Dynamics S S S**C**C C x C S C C C C C C Dynamics S S S**Main results**• Simple (homomorphic) mapping • Complete correspondance • Suggests how to introduce restriction in logic programming • What about Milner logic programming?**Milner SHR vs Fusion Calculus**• Many common features • Synchronization in Milner style • Mobility using fusions • LTS semantics • Straightforward mapping of Fusion into Milner SHR • SHR adds: • Graphical presentation • Multiple synchronizations • Concurrent semantics**Summary of the comparison**Fusion Milner SHR Processes Graphs Sequential processes Hyperedges Names Nodes Parallel comp. Parallel comp. Scope Restriction Prefixes Productions Transitions Interleaving tr.**Example**We can also execute both the steps at the same time**Main results**• Simple (homomorphic) mapping • Complete correspondance • Suggests many generalizations of Fusion • A concurrent semantics • PRISMA Calculus**Milner vs Hoare**• Surprisingly the most difficult step • Simulating Hoare using Milner • Must implement n-ary synchronization using binary synchronization • Simulating Milner using Hoare • Milner synchronization is asymmetric • In Milner restriction affects the behaviour, in Hoare just the observation**Some results**• Not equivalent in general • In closed 2-shared graphs Milner is more powerful than Hoare • Hoare implemented by dropping the distinction between actions and coactions • A translation of graphs can be used to bridge the gap in many cases • Amoeboids to simulate synchronization • Hoare amoeboids are broadcasters • Milner amoeboids are routers • Mutual exclusion can not be enforced • Not a problem in 2-shared graphs**And so?**• Synchronization and mobility strategies are an important characteristic of a model • Difficult to simulate a strategy using another one • Have strategies as parameters of the system**Roadmap**• Global computing • Comparing models for GC • Parametric synchronizations with mobility • Observational semantics and compositionality • Conclusions**Synchronization Algebras with Mobility (1)**• Extend Winskel’s synchronization algebras to deal with name mobility and local resources • Allow to have synchronization strategies as first-class citizens • Can be used to have models with parametric synchronization policies • Many synchronization policies in the same model • Different policies can be compared and combined • Common policies can be expressed as SAMs • Simple ones: Milner, Hoare, broadcast • More complex ones: with priority, treshold synchronization**Synchronization Algebras with Mobility (2)**• SAs specify composition of actions • (a,a,τ): a synchronizes with a producing τ • SAMs also provide • Arities for actions • Mapping from parameters of synchronizing actions to parameters of the result • Fusions among parameters • Final actions (can be performed on local channels) • Some more technical stuff**Sample synchronization**a b c**τ**in out a a ε Milner SAM • Normal actions, coactions, τ, ε • (in, out, τ) • (a, ε, a) • Final actions: τ, ε**Combining SAMs**• SAMs form a category • Standard constructions can be used to compose SAMs • Coproduct makes different protocols available • Product applies two protocols in parallel**Parametric SHR**• The SAM is a parameter of the model • Different models obtained via instantiation • Allows to recover Hoare and Milner SHR… • …and to easily define new models • Properties can be proved in general • Allows to highlight relations between properties of SAMs and properties of the model**The airport case study**• Taken from AGILE project on architectures for mobility • Models airplanes taking off and landing at airports and persons traveling using them • Modeled inside AGILE using • UML extended with mobility primitives • Synchronized variant of DPO • We concentrate on a small part of the case study**inBo**Take-off transition univ univ chk inPl inBo chk inPl**at**in newat at chk in Specifying the transition (1) at:<ε,<>> in:<ack,<at>> at:<req,<newat>> chk: <breq,<in>> in:<ε,<>>**newat**chk at Specifying the transition (2) at:<ε,<>> chk: <brd,<newat>>**Synchronization in the example**ε,<> Can be obtained using as SAM the coproduct of: • Milner SAM for req and ack • Broadcast SAM for breq and brd univ ack,<univ> inBo ε,<> ε,<> req,<newat> ε,<> brd,<new1> breq,<inPl> chk ε,<> brd,<new2> inPl**Effects of the synchronization**ε univ inBo τ univ/newat breq,<inPl> chk ε inPl/new1,inPl/new2 inPl**Result of the transition**univ chk inBo inPl**Heterogeneous SHR**• Allows to use different SAMs on different nodes • Concentrates on dynamic management of SAMs • SAMs are required to form a commutative monoid • Node fusions cause SAM composition • Allows to model heterogeneous systems • Different primitives in different parts of the system • Example: wireless connections with broadcast and wired connections with Milner • Conservative extension of parametric SHR**A network example**• Network with routers and clients • Channels can have • 4Kb/16Kb packets • Error detection/no error detection • To communicate a client creates a virtual communication channel that uses the underlying infrastructure • The communication channel supports 16Kb packets/error detection only if all the underlying channels do**Modeling the scenario**• Eight different SAMs with all the combinations of • 4Kb < 16Kb • No error detection < error detection • Communication < control • SAMs provide variants of Milner synchronization • E.g. action for detecting errors • SAMs form a partial order (pointwise) • SAM composition corresponds to glb**comm,16,×**Building a virtual channel R C Act 4,√ R 16,× 16,√ 4,× 16,√ 4,√ Act C 16,× R R**Ideas on the derivation**• Each production poses some constraints on the features of the resulting channel • During synchronization the constraints are composed according to the specified pattern • The characteristics of the resulting channel are automatically computed**PRISMA Calculus**• SAM-based process calculus • Prefixes of the form x a y . P • Synchronization ruled by the SAM • Mobility using fusions • Standard operators can be included • Milner PRISMA Calculus is (essentially) Fusion Calculus**Hints on technical difficulties**• In some SAMs (e.g., Hoare) a set of processes must interact to allow a synchronization on x • All the processes • All the processes that know x • All the processes able to synchronize on x • We have chosen the last approach**Roadmap**• Global computing • Comparing models for GC • Parametric synchronizations with mobility • Observational semantics and compositionality • Conclusions