60 likes | 66 Views
In the exploration of parallelism based on dataflow dependencies, this guide focuses on decomposed execution and scheduling approaches, highlighting key actions for achieving optimized performance. Learn about setting up attributes, invoking methods, and extracting results efficiently. The CHAIMS framework introduces a systematic method for managing method invocations, ensuring maximum efficiency in processing tasks. Explore how to exploit parallelism based on data dependencies, estimate execution times, and optimize scheduling strategies for improved performance.
E N D
s time time time s,i s,i i e e e decomposed (no benefit for one module) asynchronous synchronous s setup / set attributes invoke a method i extract results e Scheduler - Decomposed Execution execution of a remote method available for other methods CHAIMS
i1 i3 a i1 c (>a+b) i4 e1 a d (<a+b) i2 e1 b i2 b time e4 e2 i3 e3 c e2 time i5 e e5 exploring parallelism based on dataflow dependencies, according to estimates or run-time scheduling e3 i4 d e4 i5 e e5 non-optimized, or handprogrammed invoke a method i extract results e Scheduling - Exploit Parallelism data dependencies execution of a method CHAIMS
Scheduling - Possible Actions (1) SETUP: make SETUPs take place in parallel to method executions • call SETUPs well in advance before methods of that megamodule are invoked INVOKE: call INVOKEsas soon as possible • move INVOKEs as far up as possible, considering data dependencies ==> what if INVOKE is in an if-block? • moving it outside of an if-block: depending on cost-function concerning fees and execution times (using ESTIMATE for the method concerned and for all eventual following methods up to if-block). CHAIMS
Scheduling - Possible Actions (2) EXTRACT: call EXAMINEs and EXTRACTs when results could be ready and are needed • use ESTIMATE to estimate earliest availability of result, only start using EXAMINE then • move EXAMINE/EXTRACT as far down as possible ==> in contradiction to moving up INVOKEs • for overall optimization run-time scheduling is necessary: polling of all active invocations and issuing of next possible invocation as soon as data is ready CHAIMS
Scheduling - Possible Actions (3) Pre-scheduling: create optimized invocation plan at compile-time • use ESTIMATE to determine most reasonable order of INVOKEs and EXTRACTs • refine at run-time by run-time scheduling TERMINATE: terminate invocations that are no longer needed (save resources) • not every method invocation has an extract (e.g. print-like functions) CHAIMS
Scheduling - Simple Example 1 cost_ground_ih = cost_mmh.INVOKE ("Cost_for_Ground", 1 List_of_City_Pairs = city_pairs,Goods = info_goods) 2 WHILE (cost_ground_ih.EXAMINE() != DONE) {} 3 (cost_list_ground = cost_ground) = cost_ground_ih.EXTRACT() 3 cost_air_ih = cost_mmh.INVOKE ("Cost_for_Air", 2 List_of_City_Pairs = city_pairs,Goods = info_good) 4WHILE (cost_air_ih.EXAMINE() != DONE) {} 4 cost_list_air = cost_air_ih.EXTRACT() 5 cost_air_ih = opt_mmh.INVOKE (”Optimum", 5 cost1 = cost_list_ground, cost2 = cost_list_air) order in unscheduled megaprogram order in automatically scheduled megaprogram CHAIMS