Quantitative Analysis
Parallel Processing
Numerical Analysis
C++ Multithreading
Python for Excel
Python Utilities
Services
Author

I. Installation.
II. Threading primitives.
1. Encapsulation of primitives.
2. Preventing starvation.
3. Preventing race condition.
4. Barriers.
III. NonBlockingQueue.
IV. ThreadPool.
V. ThreadMaster.
VI. OTS Scheduler.
VII. Bibliography
Downloads. Index. Contents.

Threading primitives.


t is presumed that the reader is familiar with the boost::thread library and basic concepts of multi-threaded programming such as deadlock, starvation and race condition.

The boost library is the principal implementation tool of this project. However, we avoid hard coding of such implementation choice by introducing a template-based layer that encapsulates most external primitives. We introduce several additional primitives designed to prevent starvation and race condition. The traditional primitives for exception-safe locking are also present.

The exception safety is identical to the exception safety of boost::thread. Everything that locks may throw ots::config::ThreadResourceError. Some join and sleep-like functions throw ots::config::ThreadInterrupted.




1. Encapsulation of primitives.
2. Preventing starvation.
3. Preventing race condition.
4. Barriers.

Downloads. Index. Contents.


















Copyright 2007