1 The Computability of Relaxed Data Structures: Queues and Stacks as Examples The Computability of Relaxed Data Structures: Queues and Stacks as Examples.

Slides:



Advertisements
Similar presentations
STACKS & QUEUES. Stacks Abstract data types An abstract data type (ADT) is an abstraction of a data structure An ADT specifies : –Data stored –Operations.
Advertisements

Stacks and Queues. Not really data structures – More of an enforcement of policy – Can be implemented using an array or linked list – Can store just about.
IBM T. J. Watson Research Center Conditions for Strong Synchronization Maged Michael IBM T J Watson Research Center Joint work with: Martin Vechev, Hagit.
Breadth First Search AB F I EH DC G FIFO Queue - front.
1 Chapter 4 Synchronization Algorithms and Concurrent Programming Gadi Taubenfeld © 2014 Synchronization Algorithms and Concurrent Programming Synchronization.
A Completeness theorem for a class of synchronization objects Afek.Y, Weisberger.E, Weisman.H Presented by: Reut Schwartz.
Phillip Dickens, Department of Computer Science, University of Maine. In collaboration with Jeremy Logan, Postdoctoral Research Associate, ORNL. Improving.
Parallel Programming Motivation and terminology – from ACM/IEEE 2013 curricula.
Prof. Jennifer Welch 1. FIFO Queue Example 2  Sequential specification of a FIFO queue:  operation with invocation enq(x) and response ack  operation.
CPSC 668Set 18: Wait-Free Simulations Beyond Registers1 CPSC 668 Distributed Algorithms and Systems Fall 2006 Prof. Jennifer Welch.
 Abstract Data Type Abstract Data Type  What is the difference? What is the difference?  Stacks Stacks  Stack operations Stack operations  Parsing.
E81 CSE 532S: Advanced Multi-Paradigm Software Development Chris Gill Department of Computer Science and Engineering Washington University in St. Louis.
Inherent limitations on DAP TMs 1 Inherent Limitations on Disjoint-Access Parallel Transactional Memory Hagit Attiya, Eshcar Hillel, Alessia Milani Technion.
1 Breadth First Search AB F I EH DC G FIFO Queue - front.
WORK STEALING SCHEDULER 6/16/2010 Work Stealing Scheduler 1.
Concurrent Data Structures in Architectures with Limited Shared Memory Support Ivan Walulya Yiannis Nikolakopoulos Marina Papatriantafilou Philippas Tsigas.
Common2 Extended to Stacks Adam Morrison joint with Eli Gafni Yehuda Afek.
1 Lecture 21: Transactional Memory Topics: consistency model recap, introduction to transactional memory.
CS 206 Introduction to Computer Science II 10 / 26 / 2009 Instructor: Michael Eckmann.
COMP 110 Introduction to Programming Mr. Joshua Stough.
Chapter 6.6, (event-driven simulation) Queues 1CSCI 3333 Data Structures.
Copyright © 2010, Oracle and/or its affiliates. All rights reserved. Who’s Afraid of a Big Bad Lock Nir Shavit Sun Labs at Oracle Joint work with Danny.
SUPPORTING LOCK-FREE COMPOSITION OF CONCURRENT DATA OBJECTS Daniel Cederman and Philippas Tsigas.
Synchronization Methods for Multicore Programming Brendan Lynch.
1 © R. Guerraoui Seth Gilbert Professor: Rachid Guerraoui Assistants: M. Kapalka and A. Dragojevic Distributed Programming Laboratory.
Data Structures - Queues
Stacks and queues Basic operations Implementation of stacks and queues Stack and Queue in java.util Data Structures and Algorithms in Java, Third EditionCh04.
Parallel Programming Philippas Tsigas Chalmers University of Technology Computer Science and Engineering Department © Philippas Tsigas.
Simple Wait-Free Snapshots for Real-Time Systems with Sporadic Tasks Håkan Sundell Philippas Tsigas.
Stacks and Queues Introduction to Computing Science and Programming I.
Linearizability By Mila Oren 1. Outline  Sequential and concurrent specifications.  Define linearizability (intuition and formal model).  Composability.
Molecular Transactions G. Ramalingam Kapil Vaswani Rigorous Software Engineering, MSRI.
CSCE 668 DISTRIBUTED ALGORITHMS AND SYSTEMS Fall 2011 Prof. Jennifer Welch CSCE 668 Set 18: Wait-Free Simulations Beyond Registers 1.
CS4231 Parallel and Distributed Algorithms AY 2006/2007 Semester 2 Lecture 3 (26/01/2006) Instructor: Haifeng YU.
Motions for Permanent Undergraduate Course Numbers Brian L. Evans On Behalf of the ECE Curriculum Committee September 21, 2015.
A Consistency Framework for Iteration Operations in Concurrent Data Structures Yiannis Nikolakopoulos A. Gidenstam M. Papatriantafilou P. Tsigas Distributed.
1 Chapter 9 Synchronization Algorithms and Concurrent Programming Gadi Taubenfeld © 2014 Synchronization Algorithms and Concurrent Programming Synchronization.
WG5: Applications & Performance Evaluation Pascal Felber
1 Chapter 10 Synchronization Algorithms and Concurrent Programming Gadi Taubenfeld © 2014 Synchronization Algorithms and Concurrent Programming Synchronization.
COP INTERMEDIATE JAVA Data Structures. A data structure is a way of organizing a collection of data so that it can be manipulated effectively. A.
Wait-Free Consensus CPSC 661 Fall 2003 Supervised by: Lisa Higham Presented by: Wei Wei Zheng Nuha Kamaluddeen.
A Methodology for Creating Fast Wait-Free Data Structures Alex Koganand Erez Petrank Computer Science Technion, Israel.
1 Consensus Hierarchy Part 2. 2 FIFO (Queue) FIFO Object headtail.
ITEC 2620M Introduction to Data Structures Instructor: Prof. Z. Yang Course Website: ec2620m.htm Office: Tel 3049.
Distributed Algorithms (22903) Lecturer: Danny Hendler The wait-free hierarchy and the universality of consensus This presentation is based on the book.
Concurrent Computing Seminar Introductory Lecture Instructor: Danny Hendler
CS510 Concurrent Systems Tyler Fetters. A Methodology for Implementing Highly Concurrent Data Objects.
Scalable lock-free Stack Algorithm Wael Yehia York University February 8, 2010.
CS-2851 Dr. Mark L. Hornick 1 Stacks and Queues Behavior vs. Structure.
The Relative Power of Synchronization Operations Companion slides for The Art of Multiprocessor Programming by Maurice Herlihy & Nir Shavit.
The Concurrency Hierarchy and Algorithms for Unbounded Concurrency Eli Gafni Michael Merritt Gadi Taubenfeld.
Lecture 16 Stacks and Queues Richard Gesick. Sample test questions 1.Write a definition for a Node class that holds a number. 2.Write a method that sums.
Wait-Free Consensus CPSC 661 Fall 2003 Supervised by: Lisa Higham
QueueStack CS1020.
Chapter 15 Lists Objectives
Concurrent Objects Companion slides for
A Lock-Free Algorithm for Concurrent Bags
Introduction to Data Structure
Anders Gidenstam Håkan Sundell Philippas Tsigas
Data Structures and Database Applications Queues in C#
Lecture 21 Stacks and Queues Richard Gesick.
CSCE 668 DISTRIBUTED ALGORITHMS AND SYSTEMS
אחסון (אירגון) מידע DATA DATA DATA Link Link Link … …
Yiannis Nikolakopoulos
Lecture 22: Consistency Models, TM
Stack A data structure in which elements are inserted and removed only at one end (called the top). Enforces Last-In-First-Out (LIFO) Uses of Stacks Evaluating.
Container classes, ADTs
Breadth First Search - A B C D E F G H I front FIFO Queue.
Lecture 1: Introduction
Revised based on textbook author’s notes.
Presentation transcript:

1 The Computability of Relaxed Data Structures: Queues and Stacks as Examples The Computability of Relaxed Data Structures: Queues and Stacks as Examples Nir Shavit and Gadi Taubenfeld Version: August 2015 SIROCCO 2015Gadi Taubenfeld © 2015

2 Semantics of concurrent data structures  Sequential specification -- set of legal runs/sequences.  Sequential specification -- set of legal runs/sequences.  Consistency condition -- e.g. linearizability, sequential consistency, …  Consistency condition -- e.g. linearizability, sequential consistency, … relaxed This paper SIROCCO 2015Gadi Taubenfeld © 2015

3 Why to relax ?  Synchronization inherently limits parallelism.  Semantically weaker DS reduce the need from synchronization.  Thus, provides potential to achieve better performance and scalability.  Thus, provides potential to achieve better performance and scalability.  There are many published efficient implementations of relaxed data structures. (See related work.)  There are many published efficient implementations of relaxed data structures. (See related work.)  We are interested in computability not complexity.  We are interested in computability not complexity. SIROCCO 2015Gadi Taubenfeld © 2015

4 Queue[a,b,c] enqueuedequeue peek ab c  * -- can insert/remove/return a value at arbitrary position  0 -- operation not supported SIROCCO 2015Gadi Taubenfeld © 2015

5 Stack[a,b,c] pushpop top ab c SIROCCO 2015Gadi Taubenfeld © 2015

6 Queue[a,b,c] enqueue dequeue peek  Queue[1,1,1] -- traditional FIFO queue  Queue[1,1,0] -- does not support peek  Queue[1,1,*] -- peek returns a random value  Stack[ 1,0,1] -- atomic read/write register  Queue[*,*,0] = Stack[*,*,0] -- multiset object SIROCCO 2015Gadi Taubenfeld © 2015

7  Objects are wait-free & linearizable Consensus Number known results SIROCCO 2015Gadi Taubenfeld © 2015

8 Relaxing the enqueue operation SIROCCO 2015Gadi Taubenfeld © 2015

9 Relaxing the enqueue operation SIROCCO 2015Gadi Taubenfeld © 2015

10 Relaxing the enqueue operation SIROCCO 2015Gadi Taubenfeld © 2015

11 Relaxing the enqueue operation SIROCCO 2015Gadi Taubenfeld © 2015

12 Relaxing the enqueue operation SIROCCO 2015Gadi Taubenfeld © 2015

13 Relaxing the enqueue operation SIROCCO 2015Gadi Taubenfeld © 2015

14 Relaxing the peek operation SIROCCO 2015Gadi Taubenfeld © 2015

15 Relaxing the peek operation SIROCCO 2015Gadi Taubenfeld © 2015

16 Relaxing the peek operation SIROCCO 2015Gadi Taubenfeld © 2015

17 Relaxing the peek operation SIROCCO 2015Gadi Taubenfeld © 2015

18 Relaxing the dequeue operation SIROCCO 2015Gadi Taubenfeld © 2015

19 Relaxing the dequeue operation SIROCCO 2015Gadi Taubenfeld © 2015

20 Relaxing the dequeue operation SIROCCO 2015Gadi Taubenfeld © 2015

21 Not supporting the dequeue operation SIROCCO 2015Gadi Taubenfeld © 2015

22 Not supporting the dequeue operation SIROCCO 2015Gadi Taubenfeld © 2015

23 Not supporting the dequeue operation SIROCCO 2015Gadi Taubenfeld © 2015

24 Atomic registers vs. relaxed queues SIROCCO 2015Gadi Taubenfeld © 2015

25 Atomic registers vs. relaxed queues Can atomic registers implement … ? SIROCCO 2015Gadi Taubenfeld © 2015

26 Atomic registers vs. relaxed queues No!!! Theorem: A queue[a,0,c] has no wait-free implementation from atomic registers, for every two positive integers a and c. Theorem: A queue[a,0,c] has no wait-free implementation from atomic registers, for every two positive integers a and c. SIROCCO 2015Gadi Taubenfeld © 2015

27 Discussion  Each one of the infinitely many relaxed objects has one of the following consensus numbers: 1, 2, . Why only three?  Queue is more sensitive than stack to changes in its semantics.  Consider other types of relaxed data structures.  What is the internal structure among relaxed objects with the same consensus number? queue[1,1,0] + registers  queue[1,1,2] ? SIROCCO 2015Gadi Taubenfeld © 2015

28 Thank you for listening SIROCCO 2015Gadi Taubenfeld © 2015