MIT Lincoln Laboratory 999999-1 XYZ 3/11/2005 Introduction to a Wait-Free Hash Table Hash Table Key-Value pair stores and retrieves data Three Core Functions:

Slides:



Advertisements
Similar presentations
David Luebke 1 6/7/2014 CS 332: Algorithms Skip Lists Introduction to Hashing.
Advertisements

CS 11 C track: lecture 7 Last week: structs, typedef, linked lists This week: hash tables more on the C preprocessor extern const.
Nyhoff, ADTs, Data Structures and Problem Solving with C++, Second Edition, © 2005 Pearson Education, Inc. All rights reserved Hash Tables,
Ceng-112 Data Structures I Chapter 5 Queues.
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
Lecture 6 Hashing. Motivating Example Want to store a list whose elements are integers between 1 and 5 Will define an array of size 5, and if the list.
CS4432: Database Systems II Hash Indexing 1. Hash-Based Indexes Adaptation of main memory hash tables Support equality searches No range searches 2.
CPSC 335 Dr. Marina Gavrilova Computer Science University of Calgary Canada.
Hashing as a Dictionary Implementation
Appendix I Hashing. Chapter Scope Hashing, conceptually Using hashes to solve problems Hash implementations Java Foundations, 3rd Edition, Lewis/DePasquale/Chase21.
Data Structures: A Pseudocode Approach with C
Locality-Conscious Lock-Free Linked Lists Anastasia Braginsky & Erez Petrank 1.
Hashing Chapters What is Hashing? A technique that determines an index or location for storage of an item in a data structure The hash function.
Searching Kruse and Ryba Ch and 9.6. Problem: Search We are given a list of records. Each record has an associated key. Give efficient algorithm.
TTIT33 Algorithms and Optimization – Lecture 5 Algorithms Jan Maluszynski - HT TTIT33 – Algorithms and optimization Lecture 5 Algorithms ADT Map,
Hashing Techniques.
Lock-free Cuckoo Hashing Nhan Nguyen & Philippas Tsigas ICDCS 2014 Distributed Computing and Systems Chalmers University of Technology Gothenburg, Sweden.
Sets and Maps Chapter 9. Chapter 9: Sets and Maps2 Chapter Objectives To understand the Java Map and Set interfaces and how to use them To learn about.
Computer Laboratory Practical non-blocking data structures Tim Harris Computer Laboratory.
CS510 Advanced OS Seminar Class 10 A Methodology for Implementing Highly Concurrent Data Objects by Maurice Herlihy.
COMP 171 Data Structures and Algorithms Tutorial 10 Hash Tables.
CHAPTER 11 Searching. 2 Introduction Searching is the process of finding a target element among a group of items (the search pool), or determining that.
Lecture 10: Search Structures and Hashing
1 abstract containers hierarchical (1 to many) graph (many to many) first ith last sequence/linear (1 to 1) set.
Maps A map is an object that maps keys to values Each key can map to at most one value, and a map cannot contain duplicate keys KeyValue Map Examples Dictionaries:
Real-Time Concepts for Embedded Systems Author: Qing Li with Caroline Yao ISBN: CMPBooks.
FEN 2012UCN Technology - Computer Science 1 Data Structures and Collections Principles revisited.NET: –Two libraries: System.Collections System.Collections.Generics.
1 Hash Tables  a hash table is an array of size Tsize  has index positions 0.. Tsize-1  two types of hash tables  open hash table  array element type.
Hashtables David Kauchak cs302 Spring Administrative Talk today at lunch Midterm must take it by Friday at 6pm No assignment over the break.
Liang, Introduction to Java Programming, Sixth Edition, (c) 2007 Pearson Education, Inc. All rights reserved Chapter 22 Java Collections.
IS 2610: Data Structures Searching March 29, 2004.
Lecture 10 Trees –Definiton of trees –Uses of trees –Operations on a tree.
TECH Computer Science Dynamic Sets and Searching Analysis Technique  Amortized Analysis // average cost of each operation in the worst case Dynamic Sets.
David Luebke 1 10/25/2015 CS 332: Algorithms Skip Lists Hash Tables.
Apr 17, 2013 Persistent Data Structures. Definitions An immutable data structure is one that, once created, cannot be modified Immutable data structures.
Maged M.Michael Michael L.Scott Department of Computer Science Univeristy of Rochester Presented by: Jun Miao.
Data Structures Using C++ 2E Chapter 9 Searching and Hashing Algorithms.
CIS 068 Welcome to CIS 068 ! Lesson 10: Data Structures.
Hashing Hashing is another method for sorting and searching data.
Hashing as a Dictionary Implementation Chapter 19.
HASH TABLES -Paritosh Gupta. Problem. Required Search for The Precious One way would be to map all the data. And get key-value pairs. This means providing.
The Map ADT and Hash Tables. 2 The Map ADT  Map: An abstract data type where a value is "mapped" to a unique key  Need a key and a value to insert new.
Chapter 12 Hash Table. ● So far, the best worst-case time for searching is O(log n). ● Hash tables  average search time of O(1).  worst case search.
March 23 & 28, Csci 2111: Data and File Structures Week 10, Lectures 1 & 2 Hashing.
David Luebke 1 11/26/2015 Hash Tables. David Luebke 2 11/26/2015 Hash Tables ● Motivation: Dictionaries ■ Set of key/value pairs ■ We care about search,
March 23 & 28, Hashing. 2 What is Hashing? A Hash function is a function h(K) which transforms a key K into an address. Hashing is like indexing.
Practical concurrent algorithms Mihai Letia Concurrent Algorithms 2012 Distributed Programming Laboratory Slides by Aleksandar Dragojevic.
Collections Data structures in Java. OBJECTIVE “ WHEN TO USE WHICH DATA STRUCTURE ” D e b u g.
Hazard Pointers: Safe Memory Reclamation for Lock-Free Objects Maged M. Michael Presented by Abdulai Sei.
Hashtables. An Abstract data type that supports the following operations: –Insert –Find –Remove Search trees can be used for the same operations but require.
Hash Tables © Rick Mercer.  Outline  Discuss what a hash method does  translates a string key into an integer  Discuss a few strategies for implementing.
An Efficient CUDA Implementation of the Tree-Based Barnes Hut n-body Algorithm By Martin Burtscher and Keshav Pingali Jason Wengert.
Hashtables David Kauchak cs302 Spring Administrative Midterm must take it by Friday at 6pm No assignment over the break.
CS6045: Advanced Algorithms Data Structures. Hashing Tables Motivation: symbol tables –A compiler uses a symbol table to relate symbols to associated.
Week 15 – Wednesday.  What did we talk about last time?  Review up to Exam 1.
November 27, 2007 Verification of a Concurrent Priority Queue Bart Verzijlenberg.
Circular linked list A circular linked list is a linear linked list accept that last element points to the first element.
Hash Tables Ellen Walker CPSC 201 Data Structures Hiram College.
1 Principles revisited.NET: Two libraries: System.Collections System.Collections.Generics Data Structures and Collections.
Hashing & Hash Tables. Sets/Dictionaries Set - Our best efforts to date:
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,
Sets and Maps Chapter 9. Chapter Objectives  To understand the Java Map and Set interfaces and how to use them  To learn about hash coding and its use.
CSC 413/513: Intro to Algorithms Hash Tables. ● Hash table: ■ Given a table T and a record x, with key (= symbol) and satellite data, we need to support:
Building Java Programs Generics, hashing reading: 18.1.
Hashing CSE 2011 Winter July 2018.
Multicore programming
CSE 326: Data Structures Lecture #14
Presentation transcript:

MIT Lincoln Laboratory XYZ 3/11/2005 Introduction to a Wait-Free Hash Table Hash Table Key-Value pair stores and retrieves data Three Core Functions: – Put, Get, Delete –Constant time: O(1) Design Goals: Lock-Free and Wait-Free Nature All threads make progress Concurrent/Efficient Resize Thread-Death Safety No CAS loops Features: Probing and non-probing versions No global resize Concurrent expansion Predictable memory usage Lookahead Each key has a unique final position Steven Feldman (UCF), Pierre LaBorde (UCF), Damian Dechev (Sandia, UCF) Lock-Free/Non-Blocking: ensure that no single thread can prevent another from accessing information. Wait-Free: Guarantees that any process can complete any operation in a finite number of steps, regardless of the execution speeds of the other processes.

MIT Lincoln Laboratory XYZ 3/11/2005 Brief Algorithm Description Two types of Nodes: –Spine Node: State, Memory Array –Data Node: State, Key, Value Key treated a bit string Divided into blocks Each block determines the position the key belongs in at each level. Traversal Procedure: 1)Bits in key are rearranged 2)First X bits determine the location 3)Examine the node A.If Spine Node: Using the next X bits, examine that spine's memory array B.If Data Node: Complete the thread's operation State: Old 0K: K: K: Spine 5K: NULL 7K: State: Old 0K: K: NULL 3 4K: NULL 6 7K: Composed of Spine Nodes A position points to a spine or data node Max depth is X, where 2^X=Spine Length

MIT Lincoln Laboratory XYZ 3/11/2005 Performance Comparison Performance Analysis: Wait-Free performs better at Modification > 75% Algorithm still not optimized Probing version not worth it. Number of Threads Operations Per Second Legend: Wait-Free Hash Table (Non-Probing) Wait-Free Hash Table (Probing) TBB Concurrent Hashmap CDS Split List Hash Map (Lock-Free) Michaels Lock-Free Hash Map

MIT Lincoln Laboratory XYZ 3/11/2005 Conclusion Acknowledgements: Funding provided by UCF, NSF, and UCF’s YES program Source Code: github.com/MrStevenFeldman/ Future Work: Additional Functions - Put-if-absent - Put-if-equals - Delete-if-equals Memory pool Optimization of code Integration in real-world applications

MIT Lincoln Laboratory XYZ 3/11/2005 Example State: Old 0K: K: K: Spine 5K: NULL 7K: State: Old 0K: K: NULL 3 4K: NULL 6 7K: Inserting Key: Hashes to Position 5 is occupied Adds and expands the table Finding Key: Hashes to Examines position 2 Examines position1 Returns associated value State: Old 0NULL NULL