Search
Imagine that you are developing a multi-threaded application which proceeds concurrently many read and some write requests on a shared data structure. Your goal is to speed up the application so that there is as much read operations as possible while keeping the same amount of write operations.
Steps
git clone https://gitlab.fel.cvut.cz/matejjoe/rcu.git
make
./list_mutex <number of reader threads>
ssh username@ritchie.ciirc.cvut.cz
The rwlock is part of pthread library. You could be interested in:
The liburcu should work on Linux, Cygwin and MacOS X. You can obtain liburcu from distribution repository or compile yourself. If you want to use your own machine, I would recommend you to use library from distribution repository (`sudo apt install liburcu-dev`). In order to compile and use the library do the following:
wget https://lttng.org/files/urcu/userspace-rcu-latest-0.11.tar.bz2 tar -xjf userspace-rcu-latest-0.11.tar.bz2 cd userspace-rcu-0.11.1/ ./configure --prefix=/home/me/somefolder/mybuild/output/target make -j8 make install
-lurcu
$LIBS
-lpthread
-I/home/me/somefolder/mybuild/output/target/include
$INCLUDES
-L/home/me/somefolder/mybuild/output/target/lib
$LFLAGS
Examples how to use liburcu are available also on github: https://github.com/urcu/userspace-rcu/tree/master/doc/examples/list
https://github.com/urcu/userspace-rcu/tree/master/doc/examples/list
If you want to share your session with me, type tmux-share joel.
tmux-share joel
Article about threads and various types of locks
Article about Userspace RCU library
User-Level Implementations of Read-Copy Update