Hagit Attiya and Eshcar Hillel. Computer Science Department Technion



Similar documents
Linux Process Scheduling Policy

The LCA Problem Revisited

recursion, O(n), linked lists 6/14

Analysis of Algorithms, I

1. The memory address of the first element of an array is called A. floor address B. foundation addressc. first address D.

Load Balancing Techniques

Conditions for Strong Synchronization In Concurrent Data Types

6.852: Distributed Algorithms Fall, Class 2

Thesis Proposal: Improving the Performance of Synchronization in Concurrent Haskell

Cost Model: Work, Span and Parallelism. 1 The RAM model for sequential computation:

Job Scheduling for MapReduce

Load balancing Static Load Balancing

Spring 2011 Prof. Hyesoon Kim

Load Balancing and Termination Detection

Redo Recovery after System Crashes

Static Load Balancing

Data Structure [Question Bank]

Load balancing in a heterogeneous computer system by self-organizing Kohonen network

DATA STRUCTURES USING C

Constrained Tetrahedral Mesh Generation of Human Organs on Segmented Volume *

SIMULATION OF LOAD BALANCING ALGORITHMS: A Comparative Study

Concurrency Control. Chapter 17. Comp 521 Files and Databases Fall

Binary Search Trees CMPSC 122

Network File Storage with Graceful Performance Degradation

Load Balancing and Termination Detection

CSE 326, Data Structures. Sample Final Exam. Problem Max Points Score 1 14 (2x7) 2 18 (3x6) Total 92.

Software and the Concurrency Revolution

Data Structures. Chapter 8

Lecture Outline Overview of real-time scheduling algorithms Outline relative strengths, weaknesses

Concurrent Programming

SSC - Concurrency and Multi-threading Java multithreading programming - Synchronisation (I)

Scheduling Shop Scheduling. Tim Nieberg

Textbook and References

CS 598CSC: Combinatorial Optimization Lecture date: 2/4/2010

Lecture 7: Concurrency control. Rasmus Pagh

CSE 4351/5351 Notes 7: Task Scheduling & Load Balancing

A number of tasks executing serially or in parallel. Distribute tasks on processors so that minimal execution time is achieved. Optimal distribution

Guessing Game: NP-Complete?

Competitive Analysis of On line Randomized Call Control in Cellular Networks

Database Replication with Oracle 11g and MS SQL Server 2008

Dynamic Load Balancing. Using Work-Stealing 35.1 INTRODUCTION CHAPTER. Daniel Cederman and Philippas Tsigas

SEER PROBABILISTIC SCHEDULING FOR COMMODITY HARDWARE TRANSACTIONAL MEMORY. 27 th Symposium on Parallel Architectures and Algorithms

Quiz 4 Solutions EECS 211: FUNDAMENTALS OF COMPUTER PROGRAMMING II. 1 Q u i z 4 S o l u t i o n s

Regression Verification: Status Report

5. A full binary tree with n leaves contains [A] n nodes. [B] log n 2 nodes. [C] 2n 1 nodes. [D] n 2 nodes.

Understanding Verilog Blocking and Non-blocking Assignments

Distributed Computing over Communication Networks: Topology. (with an excursion to P2P)

Name: 1. CS372H: Spring 2009 Final Exam

MATHEMATICS Unit Decision 1

Lecture 18: Interconnection Networks. CMU : Parallel Computer Architecture and Programming (Spring 2012)

1) The postfix expression for the infix expression A+B*(C+D)/F+D*E is ABCD+*F/DE*++

A COOL AND PRACTICAL ALTERNATIVE TO TRADITIONAL HASH TABLES

COMP 631: COMPUTER NETWORKS. Internet Routing. Jasleen Kaur. Fall Forwarding vs. Routing: Local vs. Distributed

Memory Allocation. Static Allocation. Dynamic Allocation. Memory Management. Dynamic Allocation. Dynamic Storage Allocation

The Union-Find Problem Kruskal s algorithm for finding an MST presented us with a problem in data-structure design. As we looked at each edge,

Transactional Support for SDN Control Planes "

Seminar. Path planning using Voronoi diagrams and B-Splines. Stefano Martina

PERFORMANCE OF MOBILE AD HOC NETWORKING ROUTING PROTOCOLS IN REALISTIC SCENARIOS

aicas Technology Multi Core und Echtzeit Böse Überraschungen vermeiden Dr. Fridtjof Siebert CTO, aicas OOP 2011, 25 th January 2011

Chapter 7 Memory Management

Concurrency control. Concurrency problems. Database Management System

Lecture 22: November 10

Introduction to Data Structures

Small Maximal Independent Sets and Faster Exact Graph Coloring

NP-Completeness I. Lecture Overview Introduction: Reduction and Expressiveness

Chapter 7 Load Balancing and Termination Detection

Load Balancing and Termination Detection

Intro to GPU computing. Spring 2015 Mark Silberstein, , Technion 1

A Fast Algorithm For Finding Hamilton Cycles

On some Potential Research Contributions to the Multi-Core Enterprise

Performance of Dynamic Load Balancing Algorithms for Unstructured Mesh Calculations

Chapter Outline. Chapter 2 Distributed Information Systems Architecture. Middleware for Heterogeneous and Distributed Information Systems

COMBINATORIAL PROPERTIES OF THE HIGMAN-SIMS GRAPH. 1. Introduction

Hyacinth An IEEE based Multi-channel Wireless Mesh Network

Internet Sustainability and Network Marketing Safety

Structural Design Patterns Used in Data Structures Implementation

Second Order Linear Nonhomogeneous Differential Equations; Method of Undetermined Coefficients. y + p(t) y + q(t) y = g(t), g(t) 0.

Labeling outerplanar graphs with maximum degree three

MATHEMATICS: CONCEPTS, AND FOUNDATIONS Vol. III - Logic and Computer Science - Phokion G. Kolaitis

Software tools for Complex Networks Analysis. Fabrice Huet, University of Nice Sophia- Antipolis SCALE (ex-oasis) Team

Introduction to LAN/WAN. Network Layer

Handout #Ch7 San Skulrattanakulchai Gustavus Adolphus College Dec 6, Chapter 7: Digraphs

Dynamic Programming. Lecture Overview Introduction

MAC Sublayer. Abusayeed Saifullah. CS 5600 Computer Networks. These slides are adapted from Kurose and Ross

A Comparison Of Shared Memory Parallel Programming Models. Jace A Mogill David Haglin

The Classical Architecture. Storage 1 / 36

The Drinking Philosophers Problem

On the effect of forwarding table size on SDN network utilization

Load balancing. David Bindel. 12 Nov 2015

Common Data Structures

PART III. OPS-based wide area networks

INTERNATIONAL JOURNAL OF PURE AND APPLIED RESEARCH IN ENGINEERING AND TECHNOLOGY

Data Structures in Java. Session 15 Instructor: Bert Huang

[Refer Slide Time: 05:10]

GRAPH THEORY LECTURE 4: TREES

International journal of Engineering Research-Online A Peer Reviewed International Journal Articles available online

Attacking Anonymized Social Network

root node level: internal node edge leaf node Data Structures & Algorithms McQuain

Java Software Structures

Multiprocessor Scheduling and Scheduling in Linux Kernel 2.6

Transcription:

Hagit Attiya and Eshcar Hillel Computer Science Department Technion

!!" What are highly-concurrent data structures and why we care about them The concurrency of existing implementation techniques Two ideas for increasing concurrency: Conflict management Transactional memory Locking order Doubly-linked list

# $ A data structure is a collection of items An operation accesses a data set not necessarily a pair A collection of operations induces a conflict graph Nodes represent items Edges connect items of the same operation

$% &" $ Disjoint access Non adjacent edges Distance is infinite Overlapping operations Adjacent edges Distance is 0 Chains of operations Paths Distance is length of path (in the example, 2)

'&" $ Disjoint access Overlapping operations Non-overlapping operations Interference inevitable should Why not interfere? no interference Provides more concurrency & yields better throughput

( ') * Distance in the conflict graph between overlapping operations that interfere d-local step complexity: Only operations at distance d delay each other d-local contention: Only operations at distance d access the same location

!!" What are highly-concurrent data structures and why we care about them The concurrency of existing implementation techniques Two ideas for increasing concurrency: Conflict management Transactional memory Locking order Doubly-linked list

+ It is easy to implement concurrent data structures if an arbitrary number of data items can be modified atomically Simulate with single-item Compare & Swap (CAS): Acquire virtual locks on nodes in the data set Perhaps in some order Handle conflicts with blocking operations (holding a required data item)

( & #$# Acquire locks by increasing addresses Guarantees progress (the implementation is nonblocking) Help the blocking operation to complete (recursively) May result in long helping chains n-local step complexity n-local contention

% Release locks when the operation is blocked Help an immediate neighbor (only) & retry Short helping chains O(1)-local contention Long delay chains n-local step complexity

,+ ),* Operations on two data items (e.g., DCAS) Colors define the locking order Inspired by the left-right dinning philosophers algorithm Color the items when the operation starts Non-trivial! Bound the length of delay chains (log*n)-local contention and step complexity Due to the coloring stage < <

,+ )-.* Implements operations on k items, for a fixed k Based on the memory addresses, the conflict graph is decomposed into trees & items are legally colored " Need to have the data set from the start Recursive, with A&D at the basis and in each step Even more complicated (k+log*n)-local contention and step complexity

!!" What are highly-concurrent data structures and why we care about them The concurrency of existing implementation techniques Two ideas for increasing concurrency: Conflict management Transactional memory Locking order Doubly-linked list

# Software transactional memory (STM) allows to specify a transaction, accessing an arbitrary data set, as if executed atomically Static (data set is declared at invocation) vs. dynamic (data set is provided one-by-one) Alleged to be a silver bullet for concurrent programming

'/ " Known STMs have O(n)-local step complexity Some also O(n)-local contention AMTT can be considered as static STM for fixed-size data sets (k+log*n)-local contention and step complexity Recursive and restricted

We concentrate on handling conflicts between operations contending for a data item Wait for the other operation Help the other operation Rollback the other operation Acquire locks in arbitrary order No need to know the data set (or its size) in advance No pre-computation

'% 0 "1 Conflict handling depends on the operations progress so-far More advanced operation gets the item 1. How to gauge progress? 2. What to do on a tie?

2!1 The operation that locked more data items is more advanced Locality depends on data set size If a less advanced operation needs an item, then help the conflicting operation or wait (blocking in a limited radius) If a more advanced operation needs an item, then rollback the conflicting operation until it releases the item

32& 1 When both operations locked the same number of items Each operation has a descriptor, holding information about it and a lock The operations use DCAS to race for locking the two operation descriptors Winner calls the shots There s (a lot) more 2 2

!!" What are highly-concurrent data structures and why we care about them The concurrency of existing implementation techniques Two ideas for increasing concurrency: Conflict management Transactional memory Locking order Doubly-linked list

$' Can be viewed as transactional memory Our STM is highly-concurrent Relies on DCAS But has high overhead Or handled by specialized algorithms Ad-hoc and very delicate Verification is an issue Several wrong solutions...

#4+ Instead of devising ad-hoc solutions, design algorithms in a systematic manner Lock the items that have to be changed & apply a sequential implementation on these items Lock items by colors to increase concurrency Need to re-color at the start of every operation But in a specific data structure We manage a data structure since its infancy The data sets of operations are predictable unlike babies

$'3 & An important special case underlying many distributed data structures E.g., priority queue is used as job queue Insert and Remove operations Sometimes only at the ends (priority queues / deques) The data set is an item and its left / right neighbors (or left / right anchor)

, ' Always maintain the list items legally colored Adjacent items have different colors Adjust colors when inserting or removing items No need to color from scratch in each operation No cost for coloring Constant locality Esp., operations that access disjoint data sets do not delay each other

5 6 Insert operation is quite simple New items are assigned a temporary color Remove from the ends is similar to Insert Locks three items, one of them an anchor new item < < <

-- & Remove from the middle is more complicated Need to lock three list items Possibly two with same color A chain of Remove operations may lead to a long delay chain in a symmetric situation

&3%#! Use DCAS to lock equally colored nodes

%$ Explicitly think about conflict resolution and locking order Simplifies the design & correctness proofs while providing low interference Ideas from / for fine-grained locking & resource allocation Failure locality Concurrency control Our local STM incorporates contention management More information about transactions status & outlook

(. Making it really work Memory management Special treatment for read-only items (read set) Other data structures Our results indicate the usefulness of DCAS Provides a significant boost from CAS Support in hardware? Motorola 680x0, IBM S/370 Hand-crafted software implementations, further improving on # Other implementations? $ Proving inherent lower bounds Verification

6 1