Expand description

Stronghold Read-Log-Update (RLU)


This module implements the read log update synchronization mechanism to enable non-blocking concurrent reads and concurrent writes on data.

Objective


RLU solves the problem with having multiple concurrent readers being non-block, while having a writer synchronizing with the reads. RLU still suffers from writer-writer synchronization, eg. two writers with the same memory location want to update the value.

Algorithm


The main idea is to allow readers non-blocking access to data. RLU employs a global clock (counter) for (single) versioned updates on objects. On writes, a thread will create a copy of the target object, locking it before, and conduct any modification to the object inside the log. This ensure that any modification is hidden from other threads. The writing thread increments the global clock, so that readers are split into two sets: the readers reading the old state, and readers reading the new state from the logs of the writing thread.

The writing thread waits until all readers have concluded their reads, then commits the changes to memory and update the global clock.

Features


  • multiple readers / writers
  • lock free ( only internal locks )

Sources

Re-exports

pub use breaker::BusyBreaker;
pub use rlu::RLUObject;
pub use rlu::RLUStrategy;
pub use rlu::Result;
pub use rlu::RluContext;
pub use rlu::TransactionError;
pub use rlu::RLU;
pub use types::Read;
pub use types::Write;
pub use var::InnerVar;
pub use var::RLUVar;

Modules

RLU Guard Types

RLU Traits