Quantified Abstractions of Distributed Systems [chapter]

Elvira Albert, Jesús Correas, Germán Puebla, Guillermo Román-Díez
2013 Lecture Notes in Computer Science  
Introduction Distribution is currently mainstream in software development The configuration (topology) of the system changes dynamically (e.g. cloud computing) and without fixed limits When reasoning about Distributed Systems it is essential to have information: Regarding the topology of the distributed system: What are the kinds of nodes that compose the system? How many instances of each kind of node can be created Regarding communication among nodes: With which nodes can each node
more » ... ? What kind of communication is used? How often do nodes communicate? How large is the data sent in each communication? A Static Analysis for OO programs called Points-to Analysis to abstract distributed systems: good for inferring qualitative information (shapes) to infer information about nodes (abstract nodes) to infer information about communication (abstract interactions) which is valid for an unlimited number of elements in the system Resource Analysis (a.k.a. Cost Analysis) to infer upper-bounds good for inferring quantitative information the number of nodes each abstract node may represent the number of interactions represented by each abstract interaction the resource consumption of each abstract node. Concurrent objects form a well established model for distributed concurrent systems Concurrent objects live in a distributed environment Objects communicate via asynchronous method calls of the form o.m(). The o object is responsible for executing the call m() Each method call creates a new task for the corresponding object o Guillermo Román, UPM Quantified Abstractions of Distributed Systems 4/1 The Distribution Model: Coboxes For further flexibility, we allow multiple objects to be grouped into distributed nodes (Coboxes) Each cobox has its own execution engine Such engine executes the tasks of all objects that belong to the cobox Task execution may be interleaved using cooperative concurrency Each Object belongs to a cobox for its entire lifetime The topology of the system is determined by the program points where objects are created new creates an object that belongs to the current cobox newcog creates a new cobox UPM Quantified Abstractions of Distributed Systems 6/1 Example of Distributed Execution with Coboxes · · p () { a = new Ob () ; b = newcog Ob () ; a . q () ; b . q () ; a . m () ; m () ; } « Cobox 1 o p Cobox 2 a p b q Guillermo Román, UPM Quantified Abstractions of Distributed Systems 6/1 Example of Distributed Execution with Coboxes · · p () { a = new Ob () ; b = newcog Ob () ; a . q () ; b . q () ; a . m () ; m () ; } « Cobox 1 o p Cobox 2 a p b q q Guillermo Román, UPM Quantified Abstractions of Distributed Systems 6/1 Example of Distributed Execution with Coboxes · · p () { a = new Ob () ; b = newcog Ob () ; a . q () ; b . q () ; a . m () ; m () ; } « Cobox 1 o p Cobox 2 a p b q q Guillermo Román, UPM Quantified Abstractions of Distributed Systems 6/1 Example of Distributed Execution with Coboxes · · p () { a = new Ob () ; b = newcog Ob () ; a . q () ; b . q () ; a . m () ; m () ; } « Cobox 1 o p Cobox 2 a p b q q m Guillermo Román, UPM Quantified Abstractions of Distributed Systems 6/1 Example of Distributed Execution with Coboxes · · p () { a = new Ob () ; b = newcog Ob () ; a . q () ; b . q () ; a . m () ; m () ; } « Cobox 1 o p Cobox 2 a p b q q m m Guillermo Román, UPM Quantified Abstractions of Distributed Systems 6/1 Example of Distributed Execution with Coboxes · · p () { a = new Ob () ; b = newcog Ob () ; a . q () ; b . q () ; a . m () ; m () ; } Cobox 1 o p Cobox 2 a p b q q m « « m Guillermo Román, UPM Quantified Abstractions of Distributed Systems 6/1 Example of Distributed Execution with Coboxes · · p () { a = new Ob () ; b = newcog Ob () ; a . q () ; b . q () ; a . m () ; m () ; } Cobox 1 o p Cobox 2 a b q m q m Guillermo Román, UPM Quantified Abstractions of Distributed Systems 6/1 Configuration and Communication Before abstracting systems, we introduce the concrete notions of configuration and communication The Configuration of a system consists of two elements The set of coboxes created along the execution The set of objects created within each cobox The configuration is determined by the program points where objects and coboxes are created new or newcog instructions The Communication is the set of method calls between pairs of objects Guillermo Román, UPM Quantified Abstractions of Distributed Systems 7/1 Configuration Example · void m ( int n ) { Obj a = new Obj () ; Obj b = new Obj () ; b . p (n , a ) ; } void p ( int n , Obj a ) { while ( n > 0) { Obj c = new Obj () ; c . q ( a ) ; n --; } } void q ( Obj a ) { a . foo () ; } void foo () {2 inst} Guillermo Román, UPM Quantified Abstractions of Distributed Systems 8/1 Configuration Example · void m ( int n ) { Obj a = new Obj () ; Obj b = new Obj () ; b . p (n , a ) ; } void p ( int n , Obj a ) { while ( n > 0) { Obj c = new Obj () ; c . q ( a ) ; n --; } } void q ( Obj a ) { a . foo () ; } void foo () {2 inst} o m Guillermo Román, UPM Quantified Abstractions of Distributed Systems 8/1 Configuration Example · void m ( int n ) { Obj a = new Obj () ; Obj b = new Obj () ; b . p (n , a ) ; } void p ( int n , Obj a ) { while ( n > 0) { Obj c = new Obj () ; c . q ( a ) ; n --; } } void q ( Obj a ) { a . foo () ; } void foo () {2 inst} o m o a « Guillermo Román, UPM Quantified Abstractions of Distributed Systems 8/1 Configuration Example · void m ( int n ) { Obj a = new Obj () ; Obj b = new Obj () ; b . p (n , a ) ; } void p ( int n , Obj a ) { while ( n > 0) { Obj c = new Obj () ; c . q ( a ) ; n --; } } void q ( Obj a ) { a . foo () ; } void foo () {2 inst} o m o a o b « Guillermo Román, UPM Quantified Abstractions of Distributed Systems 8/1 Configuration Example · void m ( int n ) { Obj a = new Obj () ; Obj b = new Obj () ; b . p (n , a ) ; } void p ( int n , Obj a ) { while ( n > 0) { Obj c = new Obj () ; c . q ( a ) ; n --; } } void q ( Obj a ) { a . foo () ; } void foo () {2 inst} o m
doi:10.1007/978-3-642-38613-8_20 fatcat:bxhief35abgibbwawycg7pszf4