Saturation in Lock-Based Concurrent Data Structures Ph.D

Total Page:16

File Type:pdf, Size:1020Kb

Saturation in Lock-Based Concurrent Data Structures Ph.D SATURATION IN LOCK-BASED CONCURRENT DATA STRUCTURES by Kenneth Joseph Platz APPROVED BY SUPERVISORY COMMITTEE: S. Venkatesan, Co-Chair Neeraj Mittal, Co-Chair Ivor Page Cong Liu Copyright c 2017 Kenneth Joseph Platz All rights reserved This dissertation is dedicated to my wife and my parents. They have always believed in me even when I did not. SATURATION IN LOCK-BASED CONCURRENT DATA STRUCTURES by KENNETH JOSEPH PLATZ, BS, MS DISSERTATION Presented to the Faculty of The University of Texas at Dallas in Partial Fulfillment of the Requirements for the Degree of DOCTOR OF PHILOSOPHY IN COMPUTER SCIENCE THE UNIVERSITY OF TEXAS AT DALLAS December 2017 ACKNOWLEDGMENTS I would like to first of all thank my wife Tracy for having the patience and fortitude to stand with me through this journey. Without her support, I could have never started this path much less completed it. Second, I would like to thank my supervising professors, Drs. \Venky" Venkatesan and Neeraj Mittal. They both provided me with frequent guidance and support throughout this entire journey. Finally, I would like to thank the rest of my dissertation committee, Drs. Ivor Page and Cong Liu. Dr. Page especially asked many pointed (and difficult) questions during my proposal defense, and that helped improve the quality of this work. November 2017 v SATURATION IN LOCK-BASED CONCURRENT DATA STRUCTURES Kenneth Joseph Platz, PhD The University of Texas at Dallas, 2017 Supervising Professors: S. Venkatesan, Co-Chair Neeraj Mittal, Co-Chair For over three decades, computer scientists enjoyed a \free lunch" inasmuch as they could depend on processor speeds doubling every three years. This all came to an end in the mid-2000's, when manufacturers ceased increasing processor speeds and instead focused on designing processors with multiple independent execution units on each chip. The demands for ever increasing performance continue to grow in this era of multicore and manycore processors. One way to satisfy this demand is to continue developing efficient data structures which permit multiple concurrent readers and writers while guaranteeing correct behavior. Concurrent data structures synchronize via either locks or atomic read-modify-write instruc- tions (such as Compare-and-Swap). Lock-based data structures are typically less challenging to design, but lock-free data structures can provide stronger progress guarantees. We first develop two variants of existing lock-based concurrent data structures, a linked list and a skiplist. We demonstrate how we can unroll these data structures to support multiple keys per node. This substantially improves the performance in these data structures when compared to other similar data structures. We next demonstrate how lock-based data structures can saturate, or plateau in performance, at sufficiently high thread counts, dependent upon the percentage of write operations applied to that data structure. We then vi discuss how we can apply a new technique involving group mutual exclusion to provide a lock-based data structure which is resilient to saturation. We then demonstrate how this technique can be applied to our implementations of linked lists and skiplists to provide scalable performance to 250 threads and beyond. Our implementations provide excellent throughput for a wide variety of workloads, out- performing many similar lock-based and lock-free data structures. We further discuss how these techniques might apply to other data structures and provide several avenues for future research. vii TABLE OF CONTENTS ACKNOWLEDGMENTS . v ABSTRACT . vi LIST OF FIGURES . xi LIST OF TABLES . xii CHAPTER 1 INTRODUCTION . 1 1.1 Our Contributions . .3 1.2 Dissertation Roadmap . .3 CHAPTER 2 SYSTEM MODEL . 5 2.1 Shared Memory System Architecture . .5 2.2 Synchronization Primitives . .6 2.3 Correctness Conditions . .7 2.3.1 Linearizability . .7 2.3.2 Deadlock-Freedom . .9 CHAPTER 3 BACKGROUND AND RELATED WORK . 10 3.1 Synchronization in Concurrent Data Structures . 10 3.1.1 Blocking Techniques . 10 3.1.2 Non-Blocking Techniques . 11 3.2 Concurrent Linked Lists . 12 3.3 Concurrent Skiplists . 14 3.4 Group Mutual Exclusion . 16 CHAPTER 4 A CONCURRENT UNROLLED LINKED LIST WITH LAZY SYN- CHRONIZATION . 20 4.1 Algorithm Overview . 20 4.2 Algorithm Detail . 22 4.3 Correctness Proof . 26 4.4 Experimental Evaluation . 27 4.4.1 Experiment Setup . 27 4.4.2 Experimental Results . 29 viii 4.4.3 Expansion of Key and Data Sizes . 36 4.5 Introducing a Per-Thread Shortcut Cache . 37 4.5.1 Overview of Shortcut Cache . 38 4.5.2 Detail of Shortcut Cache . 40 4.5.3 Evaluation of Shortcut Cache . 42 4.6 Conclusions and Future Work . 44 CHAPTER 5 UNROLLING THE OPTIMISTIC SKIPLIST . 46 5.1 Introduction . 46 5.2 Algorithm Overview . 47 5.3 Detail of an Unrolled Skiplist . 49 5.3.1 Scan . 49 5.3.2 Lookup . 50 5.3.3 Insert . 51 5.3.4 Remove . 53 5.4 Correctness Proof . 57 5.5 Experiment Setup . 61 5.5.1 Concurrent Skip List Implementations . 62 5.5.2 Simulation Parameters . 62 5.5.3 Test System . 64 5.5.4 Experimental Methodology and Measurements . 64 5.6 Experimental Results . 64 5.6.1 Results for 1 million keys . 65 5.6.2 Results for 10 million keys . 68 5.6.3 Discussion . 70 5.7 Conclusions and Future Work . 72 CHAPTER 6 THE SATURATION PROBLEM . 73 6.1 Introduction . 73 6.2 Demonstrating Saturation on Manycore Systems . 73 6.3 Saturation in Unrolled Linked Lists . 74 ix 6.4 Saturation in Unrolled Skiplists . 76 6.5 Further Exploration of Saturation . 78 CHAPTER 7 INCREASING CONCURRENCY WITH GROUP MUTUAL EXCLU- SION . 79 7.1 About Intra-Node Concurrency . 79 7.2 Evaluation of Group Mutual Exclusion Algorithms . 81 7.2.1 Survey of Potential GME Algorithms . 82 7.2.2 Selection of GME Algorithm . 85 7.3 Introducing Intra-Node Concurrency to the Unrolled Linked List . 85 7.3.1 Algorithm Overview . 85 7.3.2 Algorithm Detail . 86 7.3.3 Experimental Evaluation . 90 7.3.4 Conclusions . 92 7.4 Introducing Intra-Node Concurrency to the Unrolled Skiplist . 93 7.4.1 Algorithm Detail . 93 7.4.2 Experiment Setup . 95 7.4.3 Intel Xeon System . 96 7.4.4 Intel Xeon Phi System . 103 7.5 An In-Depth Evaluation of the GME-enabled Skiplist . 110 7.6 Analysis and Conclusions . 113 CHAPTER 8 CONCLUSION . 114 REFERENCES . 116 BIOGRAPHICAL SKETCH . 124 CURRICULUM VITAE x LIST OF FIGURES 2.1 Example History of Concurrent Memory Location . .8 3.1 Layout of a skiplist . 14 4.1 Layout of the unrolled linked list . 21 4.2 Experimental Results on System A in Operations per Microsecond. 30 4.3 Experimental Results on System B in Operations per Microsecond. 31 4.4 Effect of Compiler Optimizations on System A . 34 4.5 Effect of Compiler Optimizations on System B . 35 4.6 Impact of Node Size on Throughput in Operations per Microsecond . 36 4.7 Impact of Shortcut Cache . 43 5.1 Layout of the unrolled skiplist . 48 5.2 Experimental Results on Intel Xeon System for one million keys. 65 5.3 Results on Intel Xeon System for 10 million keys . 68 6.1 Performance of Unrolled Linked Lists on Intel Xeon Phi System. 74 6.2 Performance of Unrolled Skiplist on Intel Xeon Phi System. 76 6.3 Performance of Unrolled Skiplist on Intel Xeon Phi System with 10 million keys. 77 7.1 Performance of Unrolled Linked Lists on Intel Xeon Phi System. 91 7.2 Results on Intel Xeon System for uniform distribution and one million keys. Throughput is reported in operations per microsecond. 97 7.3 Results on Intel Xeon System for Zipfian distribution and one million keys. Throughput is reported in completed operations per microsecond . 99 7.4 Results on Intel Xeon System for 10 million keys and uniform distribution. Through- put is reported in operations per microsecond. 100 7.5 Results on Intel Xeon System for 10 million keys and Zipfian distribution. Through- put is reported in operations per microsecond. ..
Recommended publications
  • Lecture 04 Linear Structures Sort
    Algorithmics (6EAP) MTAT.03.238 Linear structures, sorting, searching, etc Jaak Vilo 2018 Fall Jaak Vilo 1 Big-Oh notation classes Class Informal Intuition Analogy f(n) ∈ ο ( g(n) ) f is dominated by g Strictly below < f(n) ∈ O( g(n) ) Bounded from above Upper bound ≤ f(n) ∈ Θ( g(n) ) Bounded from “equal to” = above and below f(n) ∈ Ω( g(n) ) Bounded from below Lower bound ≥ f(n) ∈ ω( g(n) ) f dominates g Strictly above > Conclusions • Algorithm complexity deals with the behavior in the long-term – worst case -- typical – average case -- quite hard – best case -- bogus, cheating • In practice, long-term sometimes not necessary – E.g. for sorting 20 elements, you dont need fancy algorithms… Linear, sequential, ordered, list … Memory, disk, tape etc – is an ordered sequentially addressed media. Physical ordered list ~ array • Memory /address/ – Garbage collection • Files (character/byte list/lines in text file,…) • Disk – Disk fragmentation Linear data structures: Arrays • Array • Hashed array tree • Bidirectional map • Heightmap • Bit array • Lookup table • Bit field • Matrix • Bitboard • Parallel array • Bitmap • Sorted array • Circular buffer • Sparse array • Control table • Sparse matrix • Image • Iliffe vector • Dynamic array • Variable-length array • Gap buffer Linear data structures: Lists • Doubly linked list • Array list • Xor linked list • Linked list • Zipper • Self-organizing list • Doubly connected edge • Skip list list • Unrolled linked list • Difference list • VList Lists: Array 0 1 size MAX_SIZE-1 3 6 7 5 2 L = int[MAX_SIZE]
    [Show full text]
  • Unrolled Linked Lists
    CSCI-1200 Data Structures | Fall 2014 Homework 5 | Unrolled Linked Lists In this assignment you will modify the dslist class from Lecture 11 to implement an unrolled linked list data structure. This data structure is very similar to a standard doubly linked list, except that more than one element may be stored at each node. This data structure can have performance advantages (both in memory and running time) over a standard linked list when storing small items and can be used to better align data in the cache. You're welcome to read more about unrolled linked lists on Wikipedia (but you're not allowed to search for or use any code or pseudocode that might be available online!). Please read the entire handout before beginning your implementation. To complete the assignment you will modify the helper classes (Node and list_iterator) as well as the main class, dslist, which will be renamed \UnrolledLL". Below is a picture of the relationships between the classes (compare this to the picture of the dslist class from Lecture 11): UnrolledLL<int> head: tail: size: 14 list_iterator<int> ptr: offset: 3 Node<int> Node<int> Node<int> prev: NULL prev: prev: num_elements: 6 num_elements: 6 num_elements: 2 elements: 10 11 12 13 14 15elements: 16 17 1819 20 21 elements: 22 23 next: next: next: NULL Each Node object contains a fixed size array (size = 6 in the above example) that will store 1 or more elements from the list. The elements are ordered from left to right. From the outside, this unrolled linked list should perform exactly like an STL list containing the numbers 10 through 23 in sorted order.
    [Show full text]
  • Xilinx UG925 Zynq-7000 All Programmable Soc ZC702 Base
    Zynq-7000 All Programmable SoC ZC702 Base Targeted Reference Design (Vivado Design Suite 2013.3) User Guide UG925 (v6.0) February 21, 2014 Notice of Disclaimer The information disclosed to you hereunder (the “Materials”) is provided solely for the selection and use of Xilinx products. To the maximum extent permitted by applicable law: (1) Materials are made available "AS IS" and with all faults, Xilinx hereby DISCLAIMS ALL WARRANTIES AND CONDITIONS, EXPRESS, IMPLIED, OR STATUTORY, INCLUDING BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY, NON-INFRINGEMENT, OR FITNESS FOR ANY PARTICULAR PURPOSE; and (2) Xilinx shall not be liable (whether in contract or tort, including negligence, or under any other theory of liability) for any loss or damage of any kind or nature related to, arising under, or in connection with, the Materials (including your use of the Materials), including for any direct, indirect, special, incidental, or consequential loss or damage (including loss of data, profits, goodwill, or any type of loss or damage suffered as a result of any action brought by a third party) even if such damage or loss was reasonably foreseeable or Xilinx had been advised of the possibility of the same. Xilinx assumes no obligation to correct any errors contained in the Materials or to notify you of updates to the Materials or to product specifications. You may not reproduce, modify, distribute, or publicly display the Materials without prior written consent. Certain products are subject to the terms and conditions of the Limited Warranties which can be viewed at http://www.xilinx.com/warranty.htm; IP cores may be subject to warranty and support terms contained in a license issued to you by Xilinx.
    [Show full text]
  • Meant to Provoke Thought Regarding the Current "Software Crisis" at the Time
    1 www.onlineeducation.bharatsevaksamaj.net www.bssskillmission.in DATA STRUCTURES Topic Objective: At the end of this topic student will be able to: At the end of this topic student will be able to: Learn about software engineering principles Discover what an algorithm is and explore problem-solving techniques Become aware of structured design and object-oriented design programming methodologies Learn about classes Learn about private, protected, and public members of a class Explore how classes are implemented Become aware of Unified Modeling Language (UML) notation Examine constructors and destructors Learn about the abstract data type (ADT) Explore how classes are used to implement ADT Definition/Overview: Software engineering is the application of a systematic, disciplined, quantifiable approach to the development, operation, and maintenance of software, and the study of these approaches. That is the application of engineering to software. The term software engineering first appeared in the 1968 NATO Software Engineering Conference and WWW.BSSVE.INwas meant to provoke thought regarding the current "software crisis" at the time. Since then, it has continued as a profession and field of study dedicated to creating software that is of higher quality, cheaper, maintainable, and quicker to build. Since the field is still relatively young compared to its sister fields of engineering, there is still much work and debate around what software engineering actually is, and if it deserves the title engineering. It has grown organically out of the limitations of viewing software as just programming. Software development is a term sometimes preferred by practitioners in the industry who view software engineering as too heavy-handed and constrictive to the malleable process of creating software.
    [Show full text]
  • Open Data Structures (In Pseudocode)
    Open Data Structures (in pseudocode) Edition 0.1Gβ Pat Morin Contents Acknowledgments ix Why This Book? xi 1 Introduction 1 1.1 The Need for Efficiency ..................... 2 1.2 Interfaces ............................. 4 1.2.1 The Queue, Stack, and Deque Interfaces . 5 1.2.2 The List Interface: Linear Sequences . 6 1.2.3 The USet Interface: Unordered Sets .......... 8 1.2.4 The SSet Interface: Sorted Sets ............. 8 1.3 Mathematical Background ................... 9 1.3.1 Exponentials and Logarithms . 10 1.3.2 Factorials ......................... 11 1.3.3 Asymptotic Notation . 12 1.3.4 Randomization and Probability . 15 1.4 The Model of Computation ................... 18 1.5 Correctness, Time Complexity, and Space Complexity . 19 1.6 Code Samples .......................... 21 1.7 List of Data Structures ..................... 23 1.8 Discussion and Exercises .................... 23 2 Array-Based Lists 31 2.1 ArrayStack: Fast Stack Operations Using an Array . 32 2.1.1 The Basics ........................ 32 2.1.2 Growing and Shrinking . 35 2.1.3 Summary ......................... 37 Contents 2.2 FastArrayStack: An Optimized ArrayStack . 37 2.3 ArrayQueue: An Array-Based Queue . 38 2.3.1 Summary ......................... 41 2.4 ArrayDeque: Fast Deque Operations Using an Array . 42 2.4.1 Summary ......................... 44 2.5 DualArrayDeque: Building a Deque from Two Stacks . 44 2.5.1 Balancing ......................... 48 2.5.2 Summary ......................... 50 2.6 RootishArrayStack: A Space-Efficient Array Stack . 50 2.6.1 Analysis of Growing and Shrinking . 55 2.6.2 Space Usage ....................... 55 2.6.3 Summary ......................... 56 2.7 Discussion and Exercises .................... 57 3 Linked Lists 61 3.1 SLList: A Singly-Linked List .
    [Show full text]
  • S.Y. B.Tech. 2017-Pattern
    Bansilal Ramnath Agarwal Charitable Trust’s Vishwakarma Institute of Information Technology, Pune-48 (An Autonomous Institute affiliated to Savitribai Phule Pune University) BansilalDepartment Ramnath of ComputerAgarwal Charitable Engineering Trust’s Vishwakarma Institute of Information Technology, Pune-48 (An Autonomous Institute affiliated to Savitribai Phule Pune University) CurriculumSyllabus for for SM.Y.. BTech..Tech. (Mechanical (Computer – Design Engineering) Engineering) Department of Computer Engineering S.Y.B.Tech.(Pattern 2017) Computer Engineering 1 Bansilal Ramnath Agarwal Charitable Trust’s Vishwakarma Institute of Information Technology, Pune-48 (An Autonomous Institute affiliated to Savitribai Phule Pune University) Department of Computer Engineering Vision and Mission of the Department • Vision “Excellence in the field of Computer Engineering for rendering services to the industry and society”. • Mission To empower our students for substantial contribution to economical, technological, entrepreneurial and social progress of the society. To strive for excellence at different levels and diverse dimensions in the field of computer engineering. To encourage students to pursue research and advanced studies for better adaptability towards globalization. Program Specific Outcomes (PSOs) At the end of program, students should be able to • PSO a: Use knowledge to write programs and integrate them with the hardware/software products in the domains of embedded systems, data Science, networking and web technology. • PSO b: Participate in planning and implement solutions to cater to business – specific requirements, displaying team dynamics and professional ethics. Program Outcomes (POs) At the end of program, students should be able to: 1. Engineering knowledge: Apply the knowledge of mathematics, science, engineering fundamentals and an engineering specialization to the solution of complex engineering problems.
    [Show full text]
  • CSCI-1200 Data Structures — Fall 2018 Lecture 24 – Miscellaneous Data Structures
    CSCI-1200 Data Structures | Fall 2018 Lecture 24 { Miscellaneous Data Structures Review from Lecture 23 • STL's for_each, STL's find_if, Function Objects, a.k.a. Functors • Hash table collision resolution: separate chaining vs open addressing • STL's unordered_set (and unordered_map) • Using a hash table to implement a set/map 24.1 The Basic Data Structures This term we've covered a number of core data structures. These structures have fundamentally different memory layouts. These data structures are classic, and are not unique to C++. • array / vector • linked list • binary search tree • binary heap / priority queue • hash table 24.2 A Few Variants of the Basic Data Structures Many variants and advanced extensions and hybrid versions of these data structures are possible. Different applications with different requirements and patterns of data and data sizes and computer hardware will benefit from or leverage different aspects of these variants. This term we've already discussed / implemented a number of data structure variants: • single vs. doubly linked lists using more memory can improve convenience and running time for key operations • dummy nodes or circular linked lists { can reduce need for special case / corner case code • linked grid/matrix (Homework 5) { 2-dimensional linked list with efficient merge/split • bi-directional map (Homework 8) { 2 BSTs allow efficient find/insert/erase on both keys and values • red-black tree { an algorithm to automatically balance a binary search tree • stack and queue { restricted/reduced(!) set of operations on array/vector and list • hash table: separate chaining vs open addressing { reduce memory and avoid pointer dereferencing • priority queue with backpointers (Homework 10) { when you need to update data already in the structure We'll discuss just a few additional variants today.
    [Show full text]
  • ARM Cortex-A Series Programmer's Guide
    ARM® Cortex™-A Series Version: 4.0 Programmer’s Guide Copyright © 2011 – 2013 ARM. All rights reserved. ARM DEN0013D (ID012214) ARM Cortex-A Series Programmer’s Guide Copyright © 2011 – 2013 ARM. All rights reserved. Release Information The following changes have been made to this book. Change history Date Issue Confidentiality Change 25 March 2011 A Non-Confidential First release 10 August 2011 B Non-Confidential Second release. Updated to include Virtualization, Cortex-A15 processor, and LPAE. Corrected and revised throughout 25 June 2012 C Non-Confidential Updated to include Cortex-A7 processor, and big.LITTLE. Index added. Corrected and revised throughout. 22 January 2014 D Non-Confidential Updated to include Cortex-A12 processor, Cache Coherent Interconnect, expanded GIC coverage, Multi-core processors, Corrected and revised throughout. Proprietary Notice This Cortex-A Series Programmer’s Guide is protected by copyright and the practice or implementation of the information herein may be protected by one or more patents or pending applications. No part of this Cortex-A Series Programmer’s Guide may be reproduced in any form by any means without the express prior written permission of ARM. No license, express or implied, by estoppel or otherwise to any intellectual property rights is granted by this Cortex-A Series Programmer’s Guide. Your access to the information in this Cortex-A Series Programmer’s Guide is conditional upon your acceptance that you will not use or permit others to use the information for the purposes of determining whether implementations of the information herein infringe any third party patents. This Cortex-A Series Programmer’s Guide is provided “as is”.
    [Show full text]
  • Introduction to Programming in Python Lessons
    CLEVELAND INTRODUCTION TO PROGRAMMING IN PYTHON INSTITUTE OF LESSONS 9301C THROUGH 9310C ELECTRONICS Study Guide to accompany Fundamentals of Python – From First Programs Through Data Structures By Kenneth A. Lambert ISBN 10: 1423902181 ISBN 13: 9781423902188 This study guide contains excerpts from the Fundamentals of Python Instructor's resources and the book Fundamentals of Python – From First Programs through Data Structures by Kenneth Lambert © Copyright 2012 Cleveland Institute of Electronics All Rights Reserved / Printed in the United States of America FIRST EDITION / First Printing / March 2012 1 Contents Chat with Your Instructor ......................................................................................................... 3 Chapter 1 - Introduction ............................................................................................................ 4 Chapter 2 - Software Development, Data Types, and Expressions ...................................... 11 Python Lesson 9301C Exam ................................................................................................................. 17 Chapter 3 - Control Statements ................................................................................................. 2 Python Lesson 9302C Exam ................................................................................................................... 7 Chapter 4 - Strings and Text Files........................................................................................... 10 Chapter 5 - Lists and
    [Show full text]
  • Hw2” and Put These Three files in It
    Data Structure and Algorithm Homework #2 Due: 2:20pm, Tuesday, March 26, 2013 TA email: [email protected] === Homework submission instructions === • For Problem 1, submit your source code, a Makefile to compile the source, and a brief documentation to the SVN server (katrina.csie.ntu.edu.tw). You should create a new folder \hw2" and put these three files in it. • The filenames of the source code, Makefile, and the documentation file should be \main.c", \Makefile", and \report.txt", respectively; you will get some penalties in your grade if your submission does not follow the naming rule. The documentation file should be in plain text format (.txt file). In the documentation file you should explain how your code works, and anything you would like to convey to the TAs. • For Problem 2 through 5, submit the answers via the SVN server (electronic copy) or to the TA at the beginning of class on the due date (hard copy). • Except the programming assignment, each student may only choose to submit the homework in only one way; either all in hard copies or all via SVN. If you submit your homework partially in one way and partially in the other way, you might only get the score of the part submitted as hard copies or the part submitted via SVN (the part that the grading TA chooses). • If you choose to submit the answers of the writing problems through SVN, please combine the answers of all writing problems into only ONE file in the pdf format, with the file name in the format of \hw2 [student ID].pdf" (e.g.
    [Show full text]
  • Hashing in Other Applications
    Outline Basics Hash Collision Hashing in other applications Data and File Structures Laboratory Hashing Malay Bhattacharyya Assistant Professor Machine Intelligence Unit Indian Statistical Institute, Kolkata September, 2018 Malay Bhattacharyya Data and File Structures Laboratory Outline Basics Hash Collision Hashing in other applications 1 Basics 2 Hash Collision 3 Hashing in other applications Malay Bhattacharyya Data and File Structures Laboratory Outline Basics Hash Collision Hashing in other applications What is hashing? Definition (Hashing) Hashing is the process of indexing and retrieving data items in a data structure to provide faster way (preferably O(1)) of finding the element using the hash function. Malay Bhattacharyya Data and File Structures Laboratory Note: The hashed values are kept in a data structure known as hash tables. Outline Basics Hash Collision Hashing in other applications Hash function Definition (Hash function) A hash function h projects a value from a set with many (or even an infinite number of) data items to a value from a set with a fixed number of (fewer) data elements. Malay Bhattacharyya Data and File Structures Laboratory Outline Basics Hash Collision Hashing in other applications Hash function Definition (Hash function) A hash function h projects a value from a set with many (or even an infinite number of) data items to a value from a set with a fixed number of (fewer) data elements. Note: The hashed values are kept in a data structure known as hash tables. Malay Bhattacharyya Data and File Structures Laboratory Definition (Preimage) For a hash value k∗ = h(k), k is defined as the preimage of k∗.
    [Show full text]
  • Fundamental Data Structures Zuyd Hogeschool, ICT Contents
    Fundamental Data Structures Zuyd Hogeschool, ICT Contents 1 Introduction 1 1.1 Abstract data type ........................................... 1 1.1.1 Examples ........................................... 1 1.1.2 Introduction .......................................... 2 1.1.3 Defining an abstract data type ................................. 2 1.1.4 Advantages of abstract data typing .............................. 5 1.1.5 Typical operations ...................................... 5 1.1.6 Examples ........................................... 6 1.1.7 Implementation ........................................ 7 1.1.8 See also ............................................ 8 1.1.9 Notes ............................................. 8 1.1.10 References .......................................... 8 1.1.11 Further ............................................ 9 1.1.12 External links ......................................... 9 1.2 Data structure ............................................. 9 1.2.1 Overview ........................................... 10 1.2.2 Examples ........................................... 10 1.2.3 Language support ....................................... 11 1.2.4 See also ............................................ 11 1.2.5 References .......................................... 11 1.2.6 Further reading ........................................ 11 1.2.7 External links ......................................... 12 2 Sequences 13 2.1 Array data type ............................................ 13 2.1.1 History ...........................................
    [Show full text]