concsearchstruct - Designing Concurrent Search Structure...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Designing Concurrent Search Structure Algorithms Dennis Shasha What is a Search Structure$ Data structure typically a B tree hash structure Rtree etc that supports a dictionary Operations are insert keyvalue pair delete keyvalue pair and search for key value pair How to make a search structure algorithm concurrent Nave approach use two phase locking but then at the very least the root is read locked so lock conflicts are frequent Seminave algorithm use hierarchical tree locking lock root afterwards lock node n only if you hold lock on parent of n Still tends to hold locks high in tree How can we do better fundamental insight In a search structure algorithm all that we really care about is that we implement the dictionary operations correctly Operations on structure need not even be serializable provided they maintain certain constraints Train Your Intuition parable of the library Imagine a library with books Its a little old fashion so there are still card catalogues that identify the shelf where a book is held Bob wants to get a book B Alice is working on reorganizing the library by moving books from shelf to shelf and then changing the card catalogue Parable of the library interleaving of ops Bob look up book B in catalogue Bob read go to shelf S Bob Start walking but see friend Alice move several books from S to S leaving a note Alice change catalogue so B maps to S Bob go to S follow note to S Parable of the library observations Not conflictpreserving serializable Bob Alice Bob reads catalog then Alice changes it Alice Bob Alice modifies S before Bob reads Indeed in no serial execution would Bob go to two shelves Yet execution is completely ok Parable of the library whats going on$ All we care about is that structure is ok after Alice finishes Bob gets his book if its there We want to find a general theory for this...
View Full Document

This note was uploaded on 10/06/2011 for the course CS 2434 taught by Professor Shasha during the Spring '11 term at NYU.

Page1 / 5

concsearchstruct - Designing Concurrent Search Structure...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online