1 / 10

Here K = 2. Already read value at B is 4. old = LL(&A) if (B == 4) // compare

Using LL/SC to Simplify Word-based Software Transactional Memory by Virendra J. Marathe and Michael L. Scott Department of Computer Science University of Rochester. LL/SC as a restricted KCSS (K-Compare-Single-Swap). Here K = 2. Already read value at B is 4. old = LL(&A)

eugene
Download Presentation

Here K = 2. Already read value at B is 4. old = LL(&A) if (B == 4) // compare

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. Using LL/SC to Simplify Word-based Software Transactional MemorybyVirendra J. Marathe and Michael L. ScottDepartment of Computer ScienceUniversity of Rochester

  2. LL/SC as a restricted KCSS (K-Compare-Single-Swap) Here K = 2. Already read value at B is 4. old = LL(&A) if (B == 4) // compare if (SC(A,new) == false) // compare & swap return false else return true else return false

  3. Software Transactional Memory • A nonblocking synchronization construct • Makes concurrent programming as simple as sequential programming • Gives “true” (disjoint access parallel) concurrency

  4. Word-based Software Transactional Memory (WSTM) • by Harris and Fraser OOPSLA’03 • API for accessing shared memory • STMStart • STMRead(addr), STMWrite(addr,value) • STMCommit(), STMAbort() • STMValidate()

  5. WSTM Data Structures Shared Memory Ownership Records Transaction Descriptor Hash table Status: Active 10 a1 a2 a3 a4 a5 a3: (100,7) -> (300,8) 100 Version 15 a2: (10,15) -> (10,15) : : : : : : Transaction T

  6. WSTM Transactions Shared Memory Ownership Records Transaction Descriptor Hash table Transaction 1 Status: Committed Status: Active 10 a1 a2 a3 a4 a5 a3: (100,7) -> (300,8) Version 15 Version 15 a1: (10,7) -> (11,8) 300 100 : : : Version 11 Version 7 merge CAS (steal) Version 1 0 Transaction 2 Status: Active a3: (300,8) -> (101,9) a4: (0,11) -> (0,11) a1: (11,8) -> (11,9) Ref Count To avoid stale updates

  7. WSTM Drawback • Bounded memory blow-up problem – due to merging and false conflicts, • Complexity – merging, stealing, redo, reference counts • False merging – merge even when not necessary

  8. 2CSS Application in Atomic Copyback old = orec LL(addr) if (orec == old) // compare if (SC(addr,newval)) // compare and swap return true else return false

  9. Proposed Simplification Transaction 1 Status: Active Status: Committed 10 a1 a2 a3 a4 a5 a3: (100,7) -> (300,8) Version 15 Version 15 a1: (10,15) -> (10,15) 300 100 : : : Version 11 Version 7 LL(a3), Verify orec, SC(a3,300), Steal Version 1 0 Transaction 2 Status: Active a3: (300,8) -> (101,9) a4: (0,11) -> (0,11)

  10. Tradeoffs of Proposed Simplification • Simplicity – No merging, no stealing, no redo, just selective helping • No reference counts • No false merging • Too many LL/SCs (equal to number of locations updated) • Future Work – Empirical evaluation of proposed simplification

More Related