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

Slides:



Advertisements
Similar presentations
Stacks, Queues, and Linked Lists
Advertisements

Hazard Pointers: Safe Memory Reclamation of Lock-Free Objects
Hongjin Liang and Xinyu Feng
1 Procedural Programming Paradigm Stacks and Procedures.
By Michael Coco. Setting up the board  Two dimensional array board[x][y]  First column second row is 10  Walls will be labeled with 2  Open positions.
Hazard Pointers: Safe Memory Reclamation for Lock-Free Objects
Maged M. Michael, “Hazard Pointers: Safe Memory Reclamation for Lock- Free Objects” Presentation Robert T. Bauer.
Scalable and Lock-Free Concurrent Dictionaries
Scalable Synchronous Queues By William N. Scherer III, Doug Lea, and Michael L. Scott Presented by Ran Isenberg.
CS113 Introduction to C Instructor: Ioannis A. Vetsikas Lecture 7 : September 8.
COMP 103 Linked Stack and Linked Queue.
0 Parallel and Concurrent Real-time Garbage Collection Part II: Memory Allocation and Sweeping David F. Bacon T.J. Watson Research Center.
Introduction to Lock-free Data-structures and algorithms Micah J Best May 14/09.
Fall 2008ACS-1805 Ron McFadyen1 Ch 8 Recursion Recursion occurs when a method (or function) calls itself.
Simple, Fast, and Practical Non- Blocking and Blocking Concurrent Queue Algorithms Presenter: Jim Santmyer By: Maged M. Micheal Michael L. Scott Department.
© 2004 Goodrich, Tamassia Linked Lists1. © 2004 Goodrich, Tamassia Linked Lists2 Singly Linked List (§ 4.4.1) A singly linked list is a concrete data.
Fall 2009ACS-1805 Ron McFadyen1 Ch 8 Recursion Recursion occurs when a method (or function) calls itself.
Stacks CS-240 & CS-341 Dick Steflik. Stacks Last In, First Out operation - LIFO As items are added they are chronologically ordered, items are removed.
Comparison Under Abstraction for Verifying Linearizability Daphna Amit Noam Rinetzky Mooly Sagiv Tom RepsEran Yahav Tel Aviv UniversityUniversity of Wisconsin.
Orchestra: Intrusion Detection Using Parallel Execution and Monitoring of Program Variants in User-Space Babak Salamat, Todd Jackson, Andreas Gal, Michael.
Verifying Concurrent Objects under Fair Scheduling Hongjin Liang University of Science and Technology of China (USTC) Joint work with Xinyu Feng.
Concurrency Verification. Why concurrency verification Concurrent programs show in many systems –Multi-task support in OS kernels –Handling interrupts.
Characterizing Progress Properties of Concurrent Objects via Contextual Refinements Hongjin Liang Univ. of Science and Technology of China (USTC) Joint.
The Stack This is a special data structure: –The first item to be placed into the stack will be the last item taken out. Two basic operations: –Push: Places.
Threads Lab Keys to Success. Basics Create 4 functions that run forever, blinking the 4 lights – Test them by calling them from main Allocate an array.
Foundations of Data Structures Practical Session #4 Recurrence ADT 08/04/2013Amihai Savir & Ilya Mirsky
DATA STRUCTURE Presented By: Mahmoud Rafeek Alfarra Using C# MINISTRY OF EDUCATION & HIGHER EDUCATION COLLEGE OF SCIENCE AND TECHNOLOGY KHANYOUNIS- PALESTINE.
Data Structures Evolution of algorithms for an array-based stack, queue, and linked-list. Evolved data structures used to evolve solutions to problems.
An algorithm of Lock-free extensible hash table Yi Feng.
Hazard Pointers: Safe Memory Reclamation for Lock-Free Objects MAGED M. MICHAEL PRESENTED BY NURIT MOSCOVICI ADVANCED TOPICS IN CONCURRENT PROGRAMMING,
Scalable lock-free Stack Algorithm Wael Yehia York University February 8, 2010.
Distributed Algorithms (22903) Lecturer: Danny Hendler Lock-free stack algorithms.
CS Fall 2009 Linked List Introduction. Characteristics of Linked Lists Elements are held in objects termed Links Links are 1-1 with elements, allocated.
When block unchaining is needed? Host SIGALRM, DMA, IO Thread, Single step…  cpu_exit -> cpu_unlink_tb Virtual device raise interrupt  cpu_interrupt.
7/9/ Realizing Concurrency using Posix Threads (pthreads) B. Ramamurthy.
Dale Roberts Department of Computer and Information Science, School of Science, IUPUI CSCI 240 Abstract Data Types Queues Dale Roberts, Lecturer
IndexedListWithIteratorsViaLinear1Ind
NULL pointer assignment error- AGNEL ANTO. What is NULL pointer assignment error ? My program comes up with the message 'Null pointer assignment' after.
Stacks II David Lillis School of Computer Science and Informatics
Introduction to the Microscope
Chapter 15 Lists Objectives
Joint work with Yong Li, Xinyu Feng, Zhong Shao and Yu Zhang
Distributed Algorithms (22903)
Distributed Algorithms (22903)
CS510 Concurrent Systems Jonathan Walpole.
Distributed Algorithms (22903)
Concurrency Verification
Pointers and Dynamic Variables
BACK SOLUTION:
Pointers and Linked Lists
Non-blocking data structures and transactional memory
Stack Implementations
CS510 Concurrent Systems Jonathan Walpole.
Cs212: Data Structures Computer Science Department Lab 7: Stacks.
אחסון (אירגון) מידע DATA DATA DATA Link Link Link … …
CS510 - Portland State University
CSE 214 – Computer Science II Stack Applications
CSE 214 – Computer Science II Stacks
Stacks: Implemented using Linked Lists
Separation Logic and Concurrency Verification
Mutable Data (define mylist (list 1 2 3)) (bind ((new (list 4)))
Multicore programming
Stacks and Queues Prof. Michael Tsai 2017/02/21.
ECE 103 Engineering Programming Chapter 62 Stack Implementation
CS510 Advanced Topics in Concurrency
List Iterator Implementation
CS510 Concurrent Systems Jonathan Walpole.
STACK DATA Expert Arena ea STACK LIFO ( Stack rule) PUSH (function)

Presentation transcript:

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

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;

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

Solution: Hazard Pointers [Michael04]