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.
- This package requires C++11 or greater.
- This package requires the use of a Linux machine.
-
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
PaVTBST *bst = new PaVTBST();
PaVTBST *avl = new PaVTBST(true);
void PaVTBST::insert(int &key);
void PaVTBST::remove(int &key);
bool PaVTBST::contains(int &key);
STMPaVTBST *bst = new STMPaVTBST();
STMPaVTBST *avl = new STMPaVTBST(true);