Presentation is loading. Please wait.

Presentation is loading. Please wait.

Concurrent Aggregates (CA) Andrew A. Chien and William J. Dally Presented by: John Lynn and Ryan Wu.

Similar presentations


Presentation on theme: "Concurrent Aggregates (CA) Andrew A. Chien and William J. Dally Presented by: John Lynn and Ryan Wu."— Presentation transcript:

1 Concurrent Aggregates (CA) Andrew A. Chien and William J. Dally Presented by: John Lynn and Ryan Wu

2 Outline Motivation Serializing abstraction and concurrent aggregates Features Programming with CA Discussion

3 Motivation Parallel programs to take advantage of the massive hardware concurrency Two major concerns at that time: Programming should be relatively easy (the complexity of writing object oriented languages) Language must allow to express sufficient concurrency Hierarchies of abstractions are used to manage complexity by serializing the abstractions, which may cause significant loss of concurrency

4 Serializing Abstractions Each object accepts one msg a time Hierarchical abstractions (abstractions built from other abstractions) are built from single objects Most concurrent object-oriented languages serialize hierarchical abstractions This leaves programmers with the choice of reduced concurrency or working without useful levels of abstraction

5 Concurrent Aggregates Concurrent aggregates allow programmers to build hierarchical abstractions without serialization. Each aggregate is multi- access to receive many messages simultaneously Result: Increased message rate for lower levels

6 Background J-machine: 10 5 nodes, 64K words local memory, fast communication Fine grain computation: msg passing, context switching and fast task creation and dispatch No shared memory, and each of the nodes executes instructions from local mem. Concurrency in CA is derived from asynchronous messages sends and synchronization through context futures Similar settings in sensor networks?

7 Four important features Intra-aggregate Addressing: allows representatives of an aggregate to compute the names of other parts of the aggregate Delegation: to piece together one aggregate’s behavior from the behavior of others First Class Messages: Allow programmers to write message manipulation abstractions First Class Continuations: enables programs to code synchronizing abstractions such as futures

8 Combining Tree Message form: Combine

9 Programming with Concurrent Aggregates: Syntax Aggregate (aggregate instance-variable* (parameters param-name+)(initial exp+)) Class (class instance-variable* (parameters param-name+)(initial exp+)) (global initial-exp)

10 Example of Aggregate (aggregate counter count (parameters number_reps icount) (initial number_reps) (forall index from 1 below number_reps (set_count (sibling group index) icount)) (set_count self icount)))

11 Method and handler Handler (handler (arg*) exp+) Method (method (arg*) exp+) Delegate (delegate instance-variable)

12 Control constructs and message sends

13 Aggregation and Naming Aggregate: Homogeneous collection of objects (representatives) which are grouped together and may be referenced by a single aggregate name Messages sent to the aggregate are directed to arbitrary representatives (sibling group )

14 Example

15 Delegation and Message Handling Handlers are methods for aggregates Delegates specify targets to handle messages :rest delegate can handle messages with no specified handler

16 Bank Example Bank aggregate composed of tellers aggregate, loan officer, and manager Unusual manages delegated to manager

17 Message Handling Messages are first class objects in CA Can be created and modified programmatically Messages are passed by-value but copying is only one level deep

18 Continuations What is a continuation? Separates code from synchronization Futures as continuations

19 Futures Value method returns value immediately if available, otherwise adds continuation to a list Set_value method forwards value to all continuations on deferred list

20 Objects as Continuations A continuation is just an object that expects a reply Complex synchronization structures can be implemented as continuations

21 Barrier Barrier object implements reply method Once, maxcount is reached, all computations are resumed

22 Conclusion CA provides a programming abstraction for dealing with many processors Abstraction takes much of the complexity out of parallelizing a computation First class continuations allow for modular synchronization structures

23 Discussion How might these concepts parallel what we are trying to accomplish with sensor networks? How do these concepts differ? Of what use could concurrent aggregates be in programming a sensor network?


Download ppt "Concurrent Aggregates (CA) Andrew A. Chien and William J. Dally Presented by: John Lynn and Ryan Wu."

Similar presentations


Ads by Google