tylertownsend / TTree

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

TTree

Master Branch

Build Status Coverage Status

Develop Branch

Build Status Coverage Status

Introduction

Path Validation in search Trees (PaVT) is a validation check that allows concurrent updates to any search-tree data structure by checking if a node being searched for has been relocated. The PaVT condition was proposed by Draschler-Cohen et al. in the paper Practical Concurrent Traversals in Search Trees[1]. This repo is a reimplimination of their work using the PaVT condidition on a Binary Search Tree data structure with and without an AVL balancing condition.

There are two implementations of the BST data structure. One uses mutex locks for synchronization, PaVTBST, which is in the PaVTBST.h header file. The other is STMPaVTBST which is in the STMPaVTBST.h header file. This class uses GCC's Software Transactional Memory (STM) framework.

Setup

  • This package requires C++11 or greater.
  • This package requires the use of a Linux machine.

Compiling

  • PaVTBST

    • g++ -std=c++11 /path/to/PaVTBST.h /path/to/main -lpthread -o
  • STMPaVTBST

    • g++ -std=c++11 -fgnu-tm /path/to/PaVTBST.h /path/to/main -lpthread -o

Interface

Creating an Instance of a BST or AVL

PaVTBST *bst = new PaVTBST();
PaVTBST *avl = new PaVTBST(true);

Class functions of data structure

void PaVTBST::insert(int &key);
void PaVTBST::remove(int &key);
bool PaVTBST::contains(int &key);

Creating Instance of a BST or AVL with STM

STMPaVTBST *bst = new STMPaVTBST();
STMPaVTBST *avl = new STMPaVTBST(true);

References

[1] D. Drachsler-Cohen, M. Vechev, and E. Yahav. 2018. Practical concurrent traversals in search trees. In Proceedings of the 23rd ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming (PPoPP '18). ACM, New York, NY, USA, 207-218.

About


Languages

Language:C++ 57.3%Language:TeX 33.4%Language:CMake 8.9%Language:C 0.4%Language:Shell 0.1%