Search
Imagine that you are developing a multi-threaded application which performs many read and some write requests on a shared data structure concurrently. 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/esw/rcu.git
make
./list_mutex <number of reader threads>
ssh username@ritchie.ciirc.cvut.cz
The rwlock is a part of the pthread library. You can be interested in:
The liburcu should work on Linux, Cygwin and MacOS X. You can obtain liburcu from your Linux distribution repository or compile it yourself. If you want to use your own machine, I recommend to use the library from your Linux distribution repository (`sudo apt install liburcu-dev`). To compile and use the library do the following:
wget https://lttng.org/files/urcu/userspace-rcu-latest-0.13.tar.bz2 tar -xjf userspace-rcu-latest-0.13.tar.bz2 cd userspace-rcu-0.13.1/ ./configure --prefix=/home/me/somefolder/mybuild/output/target make -j8 make install
./doc/examples/list/
-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 the 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
Article about threads and various types of locks
Article about Userspace RCU library
User-Level Implementations of Read-Copy Update