LINEAR HASHING - PowerPoint PPT Presentation

1 / 7
About This Presentation
Title:

LINEAR HASHING

Description:

In Linear hashing this split results in linear increase in the address space ... Witold Litwin: 'Linear Hashing: A New Tool for File and Table Addressing' 6 ... – PowerPoint PPT presentation

Number of Views:653
Avg rating:3.0/5.0
Slides: 8
Provided by: vijaytrais
Category:

less

Transcript and Presenter's Notes

Title: LINEAR HASHING


1
LINEAR HASHING
  • Prepared by Vijay T. Raisinghani
  • KRESIT, IIT, Bombay

2
Introduction
  • Tree works reasonably well in case of dynamic
    files though requiring several accesses
  • Dynamic and Extendible hashing require at least
    two accesses since the data structures for the
    dynamically created hashing functions used must
    be on the disk
  • Linear Hashing requires a few bytes of main
    storage for a file of any size

3
Principles
  • Overflow records lead to rapid deterioration in
    performance as buckets fill up
  • Modification to the hashing function and file is
    required called a split
  • In Linear hashing this split results in linear
    increase in the address space
  • The basic split functions are
  • hiC--gt0,1,.., 2iN-1 1 and for any c hi(c)
    hi-1(c) 2.1
  • or hi(c) hi-1(c) 2i-1N 2.2

4
Principles
5
Principles
  • The split new bucket, is the primary bucket and
    the records are accessible in one access
  • The splits are done in a pre-defined order and
    not every time a collision occurs
  • A pointer indicates location of the split
    (initially 0). If the collision position is after
    this pointer, classical collision resolution (eg
    chaining) is used
  • This bucket will have a delayed split

6
Performance Analysis
  • The split (or grouping) may be controlled by way
    of maintaining the load factor at a threshold
  • High and constant load factor implies minimal
    storage and faster access
  • The algorithm for insert/delete/concurrency
    control is simpler, as lock on the pointer and
    key only is required ( not on a sub-tree)

7
Applications
  • Useful where the file may grow or shrink heavily
  • Eg Compilers / text processing systems
  • Avoids difficult estimation of DBMS files where
    deleted records may not be physically deleted
  • Good tool for management of workspaces of queries
    and even virtual memory
  • Since it works with very small cores, LH renders
    dynamic files usable on micro-computers
Write a Comment
User Comments (0)
About PowerShow.com