https://github.com/tomarakanksha/strict-two-phase-locking-protocol
strict two-phase locking (S2PL) protocol with shared locks for read and exclusive locks for write in the transaction manager.
https://github.com/tomarakanksha/strict-two-phase-locking-protocol
Last synced: 3 months ago
JSON representation
strict two-phase locking (S2PL) protocol with shared locks for read and exclusive locks for write in the transaction manager.
- Host: GitHub
- URL: https://github.com/tomarakanksha/strict-two-phase-locking-protocol
- Owner: tomarakanksha
- Created: 2023-01-28T00:54:41.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-01-29T18:44:40.000Z (over 2 years ago)
- Last Synced: 2025-02-05T07:23:38.424Z (4 months ago)
- Language: C
- Homepage:
- Size: 38.1 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Strict two-phase locking (S2PL) protocol
This project implement the strict two-phase locking (S2PL) protocol with shared
locks for read and exclusive locks for write in the transaction manager.# How to run this project:
This project make use of makefile and tmtest file to compile and run the code.
## Running project on Linux
1. Download make command:
```
sudo apt update
sudo apt install make
```2. Get inside the src folder, run the following command to clear the compiled classes:
```
make clean
```
This command will compile the code in src folder3. Run this command to make the executable:
```
make zgt_test
```
4. Run this command to run the program n times(since there will be race conditions(obvious because of multithtreading),
so we will run the program many times so as to check if the code works for all of them). The test files are present in tests folder which has to be run one by one to check if the code works for all the possibilities.
```
tmtest n
```
OR run this command
```
./zgt_test ../test-files/
```
## Running project on WindowsFor running this project on windows, you need to make changes in the makefile to point it to the right location
(change '/' to '\\').