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

I. Installation.
II. Threading primitives.
1. Encapsulation of primitives.
2. Preventing starvation.
3. Preventing race condition.
A. Guard primitives.
a. ReaderGuard.
b. WriterGuard.
c. UpgradeGuard.
d. TryGuard.
4. Barriers.
III. NonBlockingQueue.
IV. ThreadPool.
V. ThreadMaster.
VI. OTS Scheduler.
VII. Bibliography
Downloads. Index. Contents.

Guard primitives.

ccording to the principles ( Multi threaded design rules ) we accept references to volatile objects. We aim to use the introduced here Guard objects to simultaneously remove volatileness and gain proper ownership of the mutex inside of the object. All Guard objects expect that the client class exposes its mutex via a member function with the signature:

Mutex& mutex() const;

This means that the actual mutex data member should be defined mutable.

Constructors of the Guard objects throw the ots::config::ThreadResourceError::type (=boost::thread_resource_error) exception because the placed inside boost::thread-based locking operations throw the boost::thread_resource_error exception.

a. ReaderGuard.
b. WriterGuard.
c. UpgradeGuard.
d. TryGuard.

Downloads. Index. Contents.

Copyright 2007