Skip to content

System Overview

Yihe (William) Huang edited this page Feb 13, 2018 · 2 revisions

STO is a C++ library providing transactional semantics support for general-purpose C++ programs. It can be used to parallelize critical sections in programs without resorting to locks or similar mechanisms. STO still uses locking under the hood for concurrency control, but it is transparent to the application program and there can be no deadlocks.

STO is comprised of two major components: the core library and the data type library. The core library defines the interface and implements basic functionalities like garbage collection, transaction tracking set tracking, and concurrency control. The data type library operates on top of the STO core to provide transactional semantics for the underlying data structure. Our data type library currently includes a transactional array, a transactional list key-value map, and transactional B-tree key-value map, a transactional red-black tree key-value map, a transactional hash map, a transactional priority queue, and more.

Core Library

All STO core library files are located in the sto-core/ directory.

STO is centered around an abstraction (or interface) called the TObject. Objects that implement the TObject interface properly interact with STO internals to ensure isolated and atomic execution of a transaction. From the user's perspective, TObject functions just like a normal object, except that the transactional methods can only be used within a STO transaction, and some operations may throw an exception or return an additional value indicating that the transaction should prematurely abort.

Like other STM systems, STO manages a transaction read/write tracking set for each active transaction. The tracking set is private to the active transaction and not shared with other transactions. STO uses an abstraction called the TransItem to represent entries in the transaction tracking set.

STO also implements multiple concurrency control (CC) mechanisms. The default mechanism is optimistic concurrency control (OCC). All CC mechanisms guarantee serializability.

STO also optionally supports opacity (for selected CC mechanisms only).

Read more:

Data Type Library

The data type library is located in the datatype/ directory.

You can extend this library by implementing more data types. See how.

Using the library is as easy as including the corresponding header file(s) and invoking the transactional methods from within a STO transaction. See examples.

Clone this wiki locally