Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/afkewolczyk/my-locks
An operating systems assignment, measuring the effectiveness and speed of different types of locks.
https://github.com/afkewolczyk/my-locks
c linux lock operating-systems spinlock-test thread
Last synced: 6 days ago
JSON representation
An operating systems assignment, measuring the effectiveness and speed of different types of locks.
- Host: GitHub
- URL: https://github.com/afkewolczyk/my-locks
- Owner: afkewolczyk
- Created: 2017-01-17T00:13:27.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2017-03-31T18:57:36.000Z (over 7 years ago)
- Last Synced: 2024-11-25T19:45:55.117Z (29 days ago)
- Topics: c, linux, lock, operating-systems, spinlock-test, thread
- Language: C
- Size: 7.81 KB
- Stars: 0
- Watchers: 0
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Author
Afke Holgersen## Locks Implementations
As an assignment for an Operating Systems class, 4 locks were implemented in C and compared with the pthread locks from the pthread library:- Spinlock test-and-set
- Spinlock test-and-test-and-set
- Mutex (exponential backoff) lock
- Queue (Ticket) lockAll locks are recursive safe, meaning the same thread can only release a lock if it is locked the same number of times.
## Compile and Execution Instruction
To execute this program, the user must clone this project to his own repository and access the project directory through his own terminal.
This can be done by using the command "Cd".Before execution, compilation can be done by using the "make"command.
To execute, the user must use the following command to start the program :
./mylocks -t #threads -i #Iterations -o #OperationsOutsideCS -c #OperationsInsideCS -d testid
The user is responsible for directing operations, numbers of threads and locks intended to test. This can be done through the terminal, and by defining testid. The test id is a code that the user can define by using the following glossary :
testid: 0=all, 1=pthreadMutex, 2=pthreadSpinlock, 3=mySpinLockTAS, 4=mySpinLockTTAS, 5=myMutexTAS, 6=myQueueLock