Final project for the course Advanced Multiprocessor Programming @ TU Wien.
A wait-free snapshot is a concurrent object taken from the theory of shared-memory multiprocessor programming. An atomic snapshot constructs an instantaneous view of an array of atomic registers. It is wait-free, meaning that a thread can take an instantaneous snapshot of memory without delaying any other thread. Atomic snapshots might be useful for backups or checkpoints (Chapter no. 4 of "The art of multiprocessor programming"[1].
- Implement the Multiple Reader Single Writer wait-free snapshot presented in the Chapter 4 of "The Art of Multiprocessor Programming" book [1]
- Implement Multiple Reader Single Writer wait-free partial snapshot extension taken from "Help when needed, but no more: Efficient read/write partial snapshot" by Damien Imbs et al. [2]
- Test both the implementations for correctness
- Benchmark the methods exposed by the object, with different combinations of operations and increasing number of threads
In this repository there are present:
-
Project-3_Report.pdf, a report of the entire project in PDF format -
Makefileto compile the code -
The two main directories:
WFSnapshotwhich contains the wait-free implementation from the book, andPSnapshotwhich contains the implementation from the cited paper. The two directories share the same structure, which is made of:srcdirectory containing the source codebuilddirectory containing the.ofiles built after compilationtestdirectory containing the source code for testing the implementationsdatadirectory containing the data which would be generated after running the banchmarks
-
plotsdirectory containting thetexcode to produce plots out of the benchmark data -
benchmark.pya Python script to responsible to run the benchmarks
Just type
makeTo compile and build the two executables of the benchmarks, which will be present in the two directories WFSnapshot and PSnapshot.
Just type
make small-benchTo compile and execute the Python benchmark, which will generate the data gathered into the data directory. The two metrics measured are:
- Average latency: average amount of milliseconds to execute the operations exposed by the implementations
- Throughput: number of operations execute in a certain amount of time
Just type
make small-plotTo generate .png images out of the data, just type
Just type
make testTo generate, into the two test directories present into the two main ones, the executable containing some tests about the correctness of the implementations.
Make sure to have the gcc compiler installed alongside with the OpenMp library.
Project carried out by Cimador Gabriele, Gunter Kambiz, Ionescu Serban.
Repository licensed with the MIT license. See the LICENSE for rights and limitations.