1 / 17

D. SAHAJA

Scalable on-the-fly detection of the first races in parallel programs J eong-si K im and Young- kee J un. D. SAHAJA. Contents . Introduction Back ground Detecting the first races and scalability Related works Conclusion . Introduction .

kiaria
Download Presentation

D. SAHAJA

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. Scalable on-the-fly detection of the first races in parallel programsJeong-siKim and Young-keeJun D. SAHAJA

  2. Contents • Introduction • Back ground • Detecting the first races and scalability • Related works • Conclusion

  3. Introduction • Detecting races is important for debugging shared memory parallel programs. • A new scalable on-the-fly technique which reduces the central bottlenecks to serializing at most two accesses of each thread to a shared variable for detecting the first races in parallel programs. • Removal of such races may make other races disappear.

  4. Background Data races First races • Can occur when there are two or more concurrent accesses to the same shared data in a non atomic way. • And at least one of them is a write access • The race which occurs first First race    race1     race2 … r1-w2,r1-w8,w2-r3,w2-r5,w2-r6,w2-r7, w2-w8,r4-w8,r5-w8,r7-w8 and w8-r9

  5. First races • Candidates : • Any access such that there does not exist any other access happened before it in the same thread. • The Candidate Accesses • Definition 1: A read (write) access ai, is a read(write ) candidate, if and only if • ai is involved in a race • There is no other access ah such that ah ai, and ai is involved in a race. • Example : In the below fig1 r1 and r3 are read candidates and w2 is a write candidate.

  6. Definition : • A read-write candidate is a write access wi such that there does not exists any other write access that happened before wi ,and there exists a read candidate which happened before wi . • Example : W8 is a r-write candidate in the fig1. • Definition 3: Candidate sets for variable X are denoted • Read set: CS(X, R) • Write set: CS(X, W) • R-Write set: CS(X, RW) Fig 1

  7. Affected event : • An access ej is affected by another access ei, if eiej and ei is involved in a race. • Unaffectedrace : • A race ei-ej is unaffected, if neither ei nor ej is affected by any other accesses. • The race is partially-affected ,if only one of ei 0r ej is affected by another access. • In fig2 r3 is an affected event. Affected event Fig 2

  8. Affected event Affected event • Tangled race A tangle T is a set of partially-affected races such that if ei-ej is a race in T then exactly one of ei or ej is affected by ek such that ek-el is also in T. • In Fig 3 ,Tangle races are • r0-w3 • r1-w2 Fig 3 A first race is either an unaffected race or a tangle race.

  9. A read(write) candidate is effective by itself .An r-write candidate is effective, if there does not exist a write candidate. • Not effective candidate w8 is an r-write candidate » w8 is not effective

  10. r1 w2 r6 r7 r9 • Example : r1-w2,r1-w8,w2-r3,w2-r5,w2-r6,w2-r7,w2-w8, r4-w8,r5-w8,r7-w8 and w8-r9 r3 r5 r4 w8 r1-w2 and w2-r3 The first racesare important in debugging, because the removal of such races may make other races disappear.

  11. On-the-fly detection • Most existing on-the-fly techniques use thread-labelingscheme and race detection protocol. • Thread labeling scheme : • Label . • Comparing the labels . • Race detection protocol: • Monitors each access to every shared variable and detects races by maintaining an access history for each shared variable. • Check if there exists any access which is conflicting and concurrent with current access to detect races.

  12. In this technique, an access history for a shared variable consists of 3 kinds of candidates. • On every access to shared variables, the detection protocol for the first races • Examines and update. • Detects . • This technique introduces the central bottlenecks for serializing all access to a shared variable. • Example : Four bottle necks for four candidates are enough.

  13. Detecting first races and Scalability t_ah(X) w2 r1 r3 w8 r1 r3 w2 r1-w2,w2-r3

  14. w2 r1 r3 w8 Rc w2-r3 r1-w2 r1 r3 w2

  15. Related works • Choi and min[ChMi91]: • Deterministic re execution of the program up to the point of the races detected first. • By allowing additional instrumentation that can locate the previously undetected races. • Jun and Koh[JuKo94]: • Detecting the first race in one monitored execution but restricted to nested parallelism. • Serializing all accesses of each thread to every shared variable.

  16. Netzer and Miller[NeMi91]: • Non-artifact race, event control dependences to define how accesses affect each other. • Data races validations determines the feasible races which involve accesses either did execute concurrently or could have. • Min and Choi: • Checking accesses to shared variables by minimizing the number of times that the monitored program is interrupted. • It cannot precisely identify each pair of accesses involved in a race, can not guarantee to be a first race.

  17. Conclusion • Existing on-the-fly techniques to detect races cause the central bottle-necks of serializing all accesses to a shared variable. • Their technique reduces the centralized bottlenecks to serializing at most two accesses of each thread to a shared variable. • Removal of first races can make other races disappear. • Extending their technique for the programs which have nested parallelism with inter-thread coordination.

More Related