Presentation is loading. Please wait.

Presentation is loading. Please wait.

An example demonstrating the ABA problem Xinyu Feng University of Science and Technology of China.

Similar presentations


Presentation on theme: "An example demonstrating the ABA problem Xinyu Feng University of Science and Technology of China."— Presentation transcript:

1 An example demonstrating the ABA problem Xinyu Feng University of Science and Technology of China

2 An Optimistic Non-blocking Stack ABA problem leads to corrupted stacks … n Next n Top pop( ){ local done, next, t; done = false; while (!done) { t = Top; if (t==null) return null; next = t.Next; done = CAS(&Top, t, next); } return t;

3 ABA Problem Threads T1 and T2 are interleaved as follows: A B C Top t next Timeline T1: pop() { t = Top next = t.Next interrupted resumes CAS(&Top,t,next) succeeds stack corrupted T2: a = pop(); b = pop(); push(a); Top

4 Solution: Hazard Pointers [Michael04]


Download ppt "An example demonstrating the ABA problem Xinyu Feng University of Science and Technology of China."

Similar presentations


Ads by Google