1 / 21

NB-FEB: A Universal Scalable Easy-to-Use Synchronization Primitive for Manycore Architectures

NB-FEB: A Universal Scalable Easy-to-Use Synchronization Primitive for Manycore Architectures. Phuong H. Ha (Univ. of Tromsø, Norway) Philippas Tsigas (Chalmers Univ., Sweden) Otto J. Anshus (Univ. of Tromsø, Norway). Presentation at OPODIS ’09 December 15-18, 2009, Nimes, France. Problem.

Télécharger la présentation

NB-FEB: A Universal Scalable Easy-to-Use Synchronization Primitive for Manycore Architectures

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. NB-FEB: A Universal Scalable Easy-to-Use Synchronization Primitive forManycore Architectures Phuong H. Ha (Univ. of Tromsø, Norway) Philippas Tsigas (Chalmers Univ., Sweden) Otto J. Anshus (Univ. of Tromsø, Norway) Presentation at OPODIS ’09 December 15-18, 2009, Nimes, France

  2. Problem • Manycores require scalablestrong synchronization primitives. • Conventional strong primitives do not scale well enough for manycores [UCB Landscape]. • Contention on a synchronization variable increases with the number of processing cores. 2 cores 16 cores 1000 cores OPODIS '09, Nimes, France

  3. Desired features • New synch. primitives for manycores should be: • Scalable • 1000s of cores • Universal • powerful enough to support any kind of synchronization (like CAS, LL/SC) • Feasible • able to implement in hardware • Easy-to-use OPODIS '09, Nimes, France

  4. Our main contributions • A novel synch. primitve with all these features • Non-blocking Full/Empty Bit (NB-FEB) • NBFEB-STM: a non-blocking STM OPODIS '09, Nimes, France

  5. Road-map • NB-FEB • Feasible • Universal • Scalable • Easy-to-use • NBFEB-STM: a non-blocking STM OPODIS '09, Nimes, France

  6. Feasibility • Key idea: slight modifications of a widely deployed primitive • A variant of the original FEB that alwaysreturns a value instead of waiting for a conditional flag Test-Flag-and-Set TFAS( x, v) { (o, flago)  (x, flagx); if flagx = false then (x, flagx)  (v, true); end if return (o, flago); } Store-And-Clear SAC( x, v) { (o, flago)  (x, flagx); (x, flagx)  (v, false); return (o, flago); } Original FEB: Store-if-Clear-and-Set SICAS(x,v) { Wait for flagx to be false; (x, flagx)  (v, true); } Store-And-Set SAS( x, v) { (o, flago)  (x, flagx); (x, flagx)  (v, true); return (o, flago); } Load Load( x) { return (x, flagx); } OPODIS '09, Nimes, France

  7. Universality • Key idea: write-once objects with 3+ states • TFAS • Wait-free consensus, n Decision  (, false); TFAS_Consensus( proposal) { (first, )  TFAS(Decision, proposal); iffirst =  then returnproposal; else return first; } OPODIS '09, Nimes, France

  8. TFAS( var x, value v) atomically { (o, flago)  (x, flagx); if flagx = false then (x, flagx)  (v, true); end if return (o, flago); } Scalability • Key idea: Combinability • eliminates contention & reduce load • Ex: TFAS TFAS(x,2) TFAS(x,1) TFAS(x,4)  1 1 1 TFAS(x,3) TFAS(x,1) TFAS(x,3)  1 TFAS(x,1)  x= x=1 Note: CAS or LL/SC is not combinable OPODIS '09, Nimes, France

  9. NB-FEB combining logic OPODIS '09, Nimes, France

  10. Easy-to-use • Key idea: abstractions for productivity-layer programmers • Non-blocking software transactional memory NBFEB-STM OPODIS '09, Nimes, France

  11. Road-map • NB-FEB • Feasible • Universal • Scalable • Easy-to-use • NBFEB-STM: a non-blocking STM OPODIS '09, Nimes, France

  12. NBFEB-STM • Models • Objects are accessed within transactions • No nested transactions • Garbage collected programming languages (e.g. Java) • Features • Obstruction-free STM • Eliminate conventional synch. hot spots in STMs • Optimal space complexity (N) OPODIS '09, Nimes, France

  13. Challenge 1: TFAS-SAC interleaving CAS-based STMs NBFEB-STM Need SAC to clear pointer’s flag Overlapping TFAS1 & TFAS2 both may succeed due to SAC’s interference.  violate TMObj’s semantics locator New TM0 Old Copy Copy TMObj New TM1 Old CAS1 CAS2 New TM2 Old OPODIS '09, Nimes, France

  14. Key idea 1 • Keep a linked list of locators • write-once pointer next  eliminate SAC interference New  TM2 Old locator New TM0  Old TFAS TFAS New TM1  Old OPODIS '09, Nimes, France

  15. Challenge 2: Space complexity CAS-based STMs NBFEB-STM New TM0 Old locator locator New TM2 Old New Old TM0 New Old New TM1 TM1 TMObj Old CAS2 New TM2 Old OPODIS '09, Nimes, France

  16. Key idea 2 • Only the head is needed for further accesses  break the list of obsolete locators locator New  TM2 Old New TM0  pi Old pi SAC New TM1  Old  Optimal space complexity (N) OPODIS '09, Nimes, France

  17. Challenge 3: Find the head locator New TM0  pi Old New  TM2 Old pi X New Head TM1  Old OPODIS '09, Nimes, France

  18. Key idea 3 • No nested transactions  one active locator / thread locator TMObj New  TM2 Old New 0 TM0  pi Old pi 1 SAC … New TM1  Old i … N OPODIS '09, Nimes, France

  19. Correctness • NBFEB-STM fulfills the essential aspects of TM [Guerraoui, PPoPP ’08] • Instantaneous commit • Precluding inconsistent views • Preserving real-time order OPODIS '09, Nimes, France

  20. Conclusions • Introduce a novel non-blocking full/empty bit primitive (NB-FEB) • Scalable, universal, feasible and easy-to-use • Provide an abstraction, NBFEB-STM, built on top of the primitive. OPODIS '09, Nimes, France

  21. Thanks for your attention! OPODIS '09, Nimes, France

More Related