fractal
play

FRACTAL AN EXECUTION MODEL FOR FINE-GRAIN NESTED SPECULATIVE - PowerPoint PPT Presentation

FRACTAL AN EXECUTION MODEL FOR FINE-GRAIN NESTED SPECULATIVE PARALLELISM SU SUVINAY Y SU SUBRAMANIAN , MARK C. JEFFREY, MALEEN ABEYDEERA, HYUN RYONG LEE, VICTOR A. YING, JOEL EMER, DANIEL SANCHEZ IS ISCA 2017 Current speculative systems


  1. FRACTAL AN EXECUTION MODEL FOR FINE-GRAIN NESTED SPECULATIVE PARALLELISM SU SUVINAY Y SU SUBRAMANIAN , MARK C. JEFFREY, MALEEN ABEYDEERA, HYUN RYONG LEE, VICTOR A. YING, JOEL EMER, DANIEL SANCHEZ IS ISCA 2017

  2. Current speculative systems scale poorly Speculative parallelization, e.g. TM, simplifies parallel programming Performs poorly on real world applications… …because applications comprise large atomic tasks FRACTAL: AN EXECUTION MODEL FOR FINE-GRAIN NESTED SPECULATIVE PARALLELISM 2

  3. Large atomic tasks limit performance Database Transaction query X Millions of cycles … … Prone to aborts update Z … Challenging to track … query U … Serial (misses parallelism) … update V FRACTAL: AN EXECUTION MODEL FOR FINE-GRAIN NESTED SPECULATIVE PARALLELISM 3

  4. Large atomic tasks have abundant nested parallelism! … How to qry X qry K … - extract parallelism? - maintain atomicity? upd Z qry Y qry Y upd J qry S - achieve high performance? upd L … … … qry U qry M upd V … FRACTAL: AN EXECUTION MODEL FOR FINE-GRAIN NESTED SPECULATIVE PARALLELISM 4

  5. Prior TMs fail to exploit nested parallelism 1. Merging of “nested” speculative 2. Cyclic dependence between parent and nested children state with parent Large speculative state, prone to aborts Deadlock and livelock issues Core 1 Core 2 Core 3 Core 4 X Y X A B Y A Time B See the paper for more details! FRACTAL: AN EXECUTION MODEL FOR FINE-GRAIN NESTED SPECULATIVE PARALLELISM 5

  6. Ordering tasks to guarantee atomicity Y X X A B Y 1.1 1.2 2 1 1 2 Core 1 Core 2 Core 3 Core 4 X Y X A B Time Y A B FRACTAL: AN EXECUTION MODEL FOR FINE-GRAIN NESTED SPECULATIVE PARALLELISM 6

  7. Fractal decouples atomicity from parallelism Fr 1. Decouples unit of atomicity from unit of parallelism ◦ Domain : All tasks belonging to a domain appear to execute atomically 2. Implementation guarantees atomicity by ordering tasks ◦ No merging speculative state Tiny tasks Benefits of Fr Fractal Easy to track Composable speculative parallelism FRACTAL: AN EXECUTION MODEL FOR FINE-GRAIN NESTED SPECULATIVE PARALLELISM 7

  8. al Execution Model Fr Frac actal DECOUPLING ATOMICITY FROM PARALLELISM FRACTAL: AN EXECUTION MODEL FOR FINE-GRAIN NESTED SPECULATIVE PARALLELISM 8

  9. Domains to group tasks into atomic units Fractal programs consist of atomic tasks Tasks may access arbitrary data Tasks may create child tasks Tasks belong to a hierarchy of nested domains FRACTAL: AN EXECUTION MODEL FOR FINE-GRAIN NESTED SPECULATIVE PARALLELISM 9

  10. Semantics across domains Root domain Each task: X Y ◦ can create a single subdomain ◦ can enqueue child tasks to subdomain or current domain A B L M (All tasks in domain + creator of domain) C D N O à Appear to execute as single atomic unit E P FRACTAL: AN EXECUTION MODEL FOR FINE-GRAIN NESTED SPECULATIVE PARALLELISM 10

  11. Semantics within a domain Root domain Unordered X Y ◦ Arbitrary order while respecting parent-child dependences A B L M 1 10 Timestamp-ordered ◦ Tasks appear to execute in C D N O increasing timestamp order 12 2 ◦ Children appear to execute after parent E P 3 FRACTAL: AN EXECUTION MODEL FOR FINE-GRAIN NESTED SPECULATIVE PARALLELISM 11

  12. Fractal software API Fr Creating and enqueuing tasks fractal::enqueue(function_pointer, timestamp, arguments...); Creating sub-domains fractal::create_subdomain(<domain_type>); High-level programming interface, e.g. forall(), callcc(), parallel_reduce() FRACTAL: AN EXECUTION MODEL FOR FINE-GRAIN NESTED SPECULATIVE PARALLELISM 12

  13. Example: Database transactions in Fr Fractal Root domain TXN 1 TXN 2 T2 T1 query X query A qry X qry U qry A upd Z query Z query B 4 4 1 1 update Z update C query U update Z qry Z qry B upd V upd K update V update K 5 5 2 2 upd Z upd C 3 3 FRACTAL: AN EXECUTION MODEL FOR FINE-GRAIN NESTED SPECULATIVE PARALLELISM 13

  14. al Implementation Fr Frac actal ATOMICITY THROUGH ORDERING FRACTAL: AN EXECUTION MODEL FOR FINE-GRAIN NESTED SPECULATIVE PARALLELISM 14

  15. Fractal Virtual Time (VT) Fr Fractal assigns a fractal virtual time (VT) to each task Captures the ordering of tasks across domains, within a domain Fractal VT= 45 23 108 … 9 … Domain VT FRACTAL: AN EXECUTION MODEL FOR FINE-GRAIN NESTED SPECULATIVE PARALLELISM 15

  16. Example: Database transactions in Fr Fractal 2 1 Root domain TXN 1 TXN 2 T2 T1 2 4 2 1 1 4 1 1 query X query A qry X qry U qry A upd Z query Z query B 4 4 1 1 update Z update C 1 5 2 5 2 2 1 2 query U update Z qry Z qry B upd V upd K update V update K 5 5 2 2 2 3 1 3 upd Z upd C 3 3 FRACTAL: AN EXECUTION MODEL FOR FINE-GRAIN NESTED SPECULATIVE PARALLELISM 16

  17. Example: Database transactions in Fr Fractal 2 1 Root domain TXN 1 TXN 2 T2 T1 2 4 2 1 1 4 1 1 query X query A qry X qry U qry A upd Z query Z query B 4 4 1 1 update Z update C 1 5 2 5 2 2 1 2 query U update Z qry Z qry B upd V upd K update V update K 5 5 2 2 2 3 1 3 upd Z upd C Fractal VT captures all ordering information 3 3 FRACTAL: AN EXECUTION MODEL FOR FINE-GRAIN NESTED SPECULATIVE PARALLELISM 16

  18. Swarm [MICRO’15] : An efficient substrate for ordered speculation Swarm executes tasks Tile organization 64-tile, 256-core chip speculatively and out of order Mem / IO L3 slice Router Large hardware task queues L2 Tile Mem / IO Mem / IO Scalable ordered commits L1I/D L1I/D L1I/D L1I/D Core Core Core Core Scalable ordered speculation Task unit Mem / IO Efficiently supports tiny speculative tasks 17 FRACTAL: AN EXECUTION MODEL FOR FINE-GRAIN NESTED SPECULATIVE PARALLELISM

  19. Fractal features Fr Fractal VT construction requires no centralized structures Fractal VT assigns order dynamically Hardware supports a few number of concurrent depths ◦ “Zooming” operations allow for unbounded nesting ◦ Spill tasks from shallower domains to memory ◦ Parallelism compounds quickly with depth See the paper for more details! FRACTAL: AN EXECUTION MODEL FOR FINE-GRAIN NESTED SPECULATIVE PARALLELISM 18

  20. Core 1 Core 2 Core 3 Core 4 1 T1 TXN 1 TXN 2 query X query A query Z query B update Z update C query U update Z update V update K Time FRACTAL: AN EXECUTION MODEL FOR FINE-GRAIN NESTED SPECULATIVE PARALLELISM 19

  21. Core 1 Core 2 Core 3 Core 4 1 T1 1 1 1 4 qry X qry U TXN 1 TXN 2 query X query A query Z query B update Z update C query U update Z update V update K Time FRACTAL: AN EXECUTION MODEL FOR FINE-GRAIN NESTED SPECULATIVE PARALLELISM 19

  22. Core 1 Core 2 Core 3 Core 4 1 T1 1 1 1 4 qry X qry U 1 2 1 5 qry Z TXN 1 TXN 2 upd V query X query A query Z query B update Z update C query U update Z update V update K Time FRACTAL: AN EXECUTION MODEL FOR FINE-GRAIN NESTED SPECULATIVE PARALLELISM 19

  23. Core 1 Core 2 Core 3 Core 4 1 T1 1 1 2 1 4 T2 qry X qry U 1 2 1 5 qry Z TXN 1 TXN 2 upd V query X query A query Z query B update Z update C query U update Z update V update K Time FRACTAL: AN EXECUTION MODEL FOR FINE-GRAIN NESTED SPECULATIVE PARALLELISM 19

  24. Core 1 Core 2 Core 3 Core 4 1 T1 1 1 2 1 4 T2 qry X qry U 2 1 1 2 2 4 1 5 qry Z qry A upd Z TXN 1 TXN 2 upd V query X query A query Z query B update Z update C query U update Z update V update K Time FRACTAL: AN EXECUTION MODEL FOR FINE-GRAIN NESTED SPECULATIVE PARALLELISM 19

  25. Core 1 Core 2 Core 3 Core 4 1 T1 1 1 2 1 4 T2 qry X qry U 2 1 1 2 2 4 1 5 qry Z qry A upd Z TXN 1 TXN 2 upd V 2 2 2 5 query X query A upd K qry B query Z query B update Z update C query U update Z update V update K Time FRACTAL: AN EXECUTION MODEL FOR FINE-GRAIN NESTED SPECULATIVE PARALLELISM 19

  26. Core 1 Core 2 Core 3 Core 4 1 T1 1 1 2 1 4 T2 qry X qry U 2 1 1 2 2 4 1 5 qry Z qry A upd Z TXN 1 TXN 2 upd V 2 2 2 5 1 3 query X query A upd K qry B upd Z query Z query B update Z update C query U update Z update V update K Time FRACTAL: AN EXECUTION MODEL FOR FINE-GRAIN NESTED SPECULATIVE PARALLELISM 19

  27. Core 1 Core 2 Core 3 Core 4 1 T1 1 1 2 1 4 T2 qry X qry U 2 1 1 2 2 4 1 5 qry Z qry A upd Z TXN 1 TXN 2 upd V 2 2 2 5 1 3 query X query A upd K qry B upd Z query Z query B update Z update C query U update Z update V update K Time FRACTAL: AN EXECUTION MODEL FOR FINE-GRAIN NESTED SPECULATIVE PARALLELISM 19

  28. Core 1 Core 2 Core 3 Core 4 1 T1 1 1 2 1 4 T2 qry X Abort task qry U 2 1 1 2 2 4 1 5 qry Z qry A upd Z TXN 1 TXN 2 upd V 2 2 2 5 1 3 query X query A upd K qry B upd Z query Z query B update Z update C query U update Z update V update K Time FRACTAL: AN EXECUTION MODEL FOR FINE-GRAIN NESTED SPECULATIVE PARALLELISM 19

  29. Core 1 Core 2 Core 3 Core 4 1 T1 1 1 2 1 4 T2 qry X Abort task qry U 2 1 1 2 2 4 1 5 qry Z qry A upd Z TXN 1 TXN 2 upd V 2 2 2 5 1 3 query X query A upd K qry B upd Z query Z query B update Z update C query U update Z update V update K Time FRACTAL: AN EXECUTION MODEL FOR FINE-GRAIN NESTED SPECULATIVE PARALLELISM 19

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend