Implementation of Concurrent Trie Data Structure using Single Locking, Reader Writer's Locking and Hand over Hand Locking.
concurrent_trie
ββ concurrent_threads
β ββ 50-50.png
β ββ 50-50_final.png
β ββ CSV
β β ββ hoh_lock.csv
β β ββ rw_lock.csv
β β ββ s_lock.csv
β ββ data
β β ββ find
β β β ββ work.txt
β β ββ initial
β β β ββ work.txt
β β ββ pref
β β β ββ work.txt
β β ββ rem
β β ββ work.txt
β ββ generate.h
β ββ hoh_lock_trie.c
β ββ Makefile
β ββ plot.py
β ββ Read_Intensive.png
β ββ Read_Intensive_final.png
β ββ rw_lock_trie.c
β ββ s_lock_trie.c
β ββ workload.py
β ββ Write_Intensive.png
β ββ Write_Intensive_final.png
ββ Makefile
ββ README.md
ββ tests
β ββ multi_thread
β β ββ find
β β β ββ 1.txt
β β β ββ 2.txt
β β β ββ 3.txt
β β β ββ exp_find_1.txt
β β β ββ exp_find_2.txt
β β β ββ exp_find_3.txt
β β ββ initial
β β β ββ 1.txt
β β β ββ 2.txt
β β β ββ 3.txt
β β β ββ exp_ins.txt
β β ββ pref
β β β ββ 1.txt
β β β ββ 2.txt
β β β ββ 3.txt
β β β ββ exp_1.txt
β β β ββ exp_2.txt
β β β ββ exp_3.txt
β β ββ rem
β β ββ 1.txt
β β ββ 2.txt
β β ββ 3.txt
β β ββ exp.txt
β ββ single_thread
β ββ exp_ins.txt
β ββ exp_rem.txt
β ββ find_test.txt
β ββ find_test_exp.txt
β ββ initial.txt
β ββ pref_text.txt
β ββ pref_text_exp.txt
β ββ rem_list.txt
ββ trie.c
ββ trie.h
ββ trie_size
ββ 50-50.png
ββ 50-50_final.png
ββ CSV
β ββ hoh_lock.csv
β ββ rw_lock.csv
β ββ s_lock.csv
ββ data
β ββ find
β β ββ 1.txt
β ββ initial
β β ββ 1.txt
β ββ pref
β β ββ 1.txt
β ββ rem
β ββ 1.txt
ββ generate.h
ββ hoh_lock_trie.c
ββ Makefile
ββ plot.py
ββ Read_Intensive.png
ββ Read_Intensive_final.png
ββ rw_lock_trie.c
ββ s_lock_trie.c
ββ workload.py
ββ Write_Intensive.png
ββ Write_Intensive_final.png
β
Concurreny
β
Autocompletion, Insert, Find, Delete Key and Delete Trie
β
Single Locking
β
Hand Over Hand Locking
β
Reader-Writer's Locking
- Run
maketo run all the tests. For specific tests, follow the instructions below:
- Single Threaded:
make test_trie_single_threaded - Multi Threaded (Single Locking):
make test_trie_s_lock - Multi Threaded (R/W Lock):
make test_trie_rw_lock - Multi Threaded (Hand on Hand Lock):
make test_trie_hoh_lock
- Single Threaded:
make single_threaded - Multi Threaded (Single Locking):
make s_lock - Multi Threaded (R/W Lock):
make rw_lock - Multi Threaded (Hand on Hand Lock):
make hoh_lock
- Install numpy using
pip install numpy - Install scipy using
pip install scipy - Install matplotlib using
pip install matplotlib
In the concurrent_threads folder:
- Run
make workloadto generate the workload. - Run
maketo compile and execute the files as well as create the plots.
In the trie_size folder:
- Run
make workloadto generate the workload. - Run
maketo compile and execute the files as well as create the plots.
For plotting insert and find have been used for 50-50 workload, while only insert and find are used in write intensive case and read intensive case respectively.
-
Varying the number of concurrent threads from 1 to 100
-
Workload with 100000 entries per file
-
Plot for 50-50 workload
| 50-50 Workload | 50-50 Workload Averaged |
|---|---|
![]() |
![]() |
- Plot for Read Intensive workload
| Read Intensive Workload | Read Intensive Workload Averaged |
|---|---|
![]() |
![]() |
- Plot for Write Intensive workload
| Write Intensive Workload | Write Intensive Workload Averaged |
|---|---|
![]() |
![]() |
-
Varying the trie size from 1 to 100
-
Taking 100 concurrent threads
-
Workload with 15000 entries per file
-
Plot for 50-50 workload
| 50-50 Workload | 50-50 Workload Averaged |
|---|---|
![]() |
![]() |
- Plot for Read Intensive workload
| Read Intensive Workload | Read Intensive Workload Averaged |
|---|---|
![]() |
![]() |
- Plot for Write Intensive workload
| Write Intensive Workload | Write Intensive Workload Averaged |
|---|---|
![]() |
![]() |











