Presentation is loading. Please wait.

Presentation is loading. Please wait.

JLS - Abr001 João Luís Sobral Departamento de Informática Universidade do Minho Braga - Portugal Scalable Object Oriented Parallel Programming (SCOOPP)

Similar presentations


Presentation on theme: "JLS - Abr001 João Luís Sobral Departamento de Informática Universidade do Minho Braga - Portugal Scalable Object Oriented Parallel Programming (SCOOPP)"— Presentation transcript:

1 JLS - Abr001 João Luís Sobral Departamento de Informática Universidade do Minho Braga - Portugal Scalable Object Oriented Parallel Programming (SCOOPP)

2 JLS - Abr002 Object Oriented Concurrent Programming Concurrent and Parallel Programming –Concerned with efficiency –Abstractions Processes or/and threads Inter-processes communication (IPC) or/and synchronisation Object Oriented Programming –Concerned with development and maintenance costs –Abstractions Objects and classes Method calls

3 JLS - Abr003 Parallel Programming + Object Oriented Programming –Efficiency + low development and maintenance costs –Abstractions? Processes or/and threads and Inter-processes communication? Objects and method calls Design approaches –Centred on processes –Centred on objects Object based Method based Object Oriented Concurrent Programming

4 JLS - Abr004 Process centred approach –Abstractions Processes + IPC + objects + method calls –Drawbacks Processes and IPC lack of OO features Static bind of objects to process Object Oriented Concurrent Programming

5 JLS - Abr005 Object centred approach - Method based –Abstractions Objects + method calls + asynchronous method calls –Based on intra-object concurrency –Drawbacks Low efficiency on distributed memory systems Object centred approach - Object based –Abstractions Active objects + method Calls + asynchronous method calls –Based on inter-object concurrency –Drawbacks High implementation costs of active objects Object Oriented Concurrent Programming

6 JLS - Abr006 SCOOPP overview SCOOPP overview (SCalable Object Oriented Parallel Programming) Main Goals –Support scalable, portable and efficient // applications –Support already developed OO sequential code Main Features –Support both explicit and implicit parallelism –Parallelism extraction –Excess parallelism removal at run-time (e.g., dynamic granularity control) –Hybrid compile and run-time system

7 JLS - Abr007 SCOOPP overview Motivation –Parallelism grain-size has a strong impact on performance : Larger number of parallel tasks may help to scale the application and improve load distribution If parallel tasks are too fine, performance may degrade due to parallelism overheads –Example (prime numbers sieve):

8 JLS - Abr008 Based on parallel and sequential objects Parallel objects are specified at class level Sequential objects are placed in a parallel object context Inter-parallel object communication based on asynchronous or synchronous method invocation First class references to parallel objects SCOOPP programming model

9 JLS - Abr009 Transforms sequential objects into parallel objects Adds further parallelism to parallel code Performs inter-object dependency analysis to preserve the sequential code determinism Example SCOOPP parallelism extraction

10 JLS - Abr0010 Packing methodologies –How to adapt the grain-size? –Which tasks to pack? Packing policies –When to adapt the grain-size? –How many items to pack? SCOOPP dynamic grain-size adaptation

11 JLS - Abr0011 How to adapt the grain-size? –Pack // objects: Associate a process to several // objects Serialise intra-process operations: –Intra-grain method calls performed directly –Object creation/deletion performed directly –Pack method calls: Include several method calls in a single message –Example SCOOPP dynamic grain-size adaptation

12 JLS - Abr0012 Which tasks to pack/unpack? –On // object creations Pack a newly created // object into de source grain or create a new remote grain –On method calls Generate a new message for method call or pack it together with other method calls –Based on run-time granularity information SCOOPP dynamic grain-size adaptation

13 JLS - Abr0013 Granularity information –Application independent Latency of a remote “null-method” call Inter-node communication bandwidth –Application dependent Average overhead of method parameters passing Average method execution time Average method fan-out SCOOPP dynamic grain-size adaptation

14 JLS - Abr0014 When to adapt the grain-size? When the overhead of a remote method call is larger than the average method execution time When the systems is “highly loaded” How many items to pack? –// objects Remote call overhead should be less than “remote work” –Method calls Message passing overhead should be less than “remote work” SCOOPP dynamic grain-size adaptation

15 JLS - Abr0015 Extension to C++ Runs on Parix and PVM environments RTS: Current prototype (ParC++) Inter-grains a) and intra-grain b) method call, RTS c) and d) direct object creation

16 JLS - Abr0016 Example: - prime number sieve parallel class SieveFilter { SieveFilter *seg, int myVal; // next sieve and my prime number public: SieveFilter(int prime) { myVal=prime; seg=0; } void Process(int num) { if ((num%myVal)==0) /* nothing */// myVal divides num else if (seg!=0) seg->Process(num); // may be prime number else seg = new SieveFilter(num); //is a prime }; void openOn(void) { SieveFilter *firstSieve = new SieveFilter(3); // create first sieve for(int i=5; i Process(i); // send values } Current prototype (ParC++)

17 JLS - Abr0017 Low level evaluation –Object management overhead costs (Myrinet cluster of 4x PII, 350Mhz, in  sec) Evaluation results (on ParC++)

18 JLS - Abr0018 High level evaluation - prime number sieve Evaluation results (on ParC++) SCOOPP

19 JLS - Abr0019 SCOOPP main benefits: –Allows the expression of the full potential parallelism, following an OO approach, in a platform independent way –Provides dynamic and efficient scalability across several target platforms, without any code modification Current and future work –Packing policies for other types of applications –More case studies Concluding remarks


Download ppt "JLS - Abr001 João Luís Sobral Departamento de Informática Universidade do Minho Braga - Portugal Scalable Object Oriented Parallel Programming (SCOOPP)"

Similar presentations


Ads by Google