1 / 4

An example demonstrating the ABA problem

An example demonstrating the ABA problem. Xinyu Feng University of Science and Technology of China. An Optimistic Non-blocking Stack. Top. Next. Next. n. n. …. pop( ){ local done, next, t; done = false; while (!done) { t = Top; if (t==null) return null;

Télécharger la présentation

An example demonstrating the ABA problem

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. An example demonstrating the ABA problem Xinyu Feng University of Science and Technology of China

  2. An Optimistic Non-blocking Stack Top Next Next n n … 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; ABA problem leads to corrupted stacks

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

  4. Solution: Hazard Pointers [Michael04]

More Related