How does ValueStore (Parallel Computing Toolbox) deal with concurrent write access?
Show older comments
Usecase: random and parallel read access on network where operating system read-cache functionality is ineffective. Therefore, we implement our own read cache.
I am working on a script where in a parfor loop data is loaded and stored, going through the cache and also filling the cache.
Thus, each parallel worker has to access - namely read and extend - this cache/shared data storage independently.
After working with persistent variables (+external interprocess library), I found the very new ValueStore [1] functionality which seems to do the job with less hassle.
But I couldn't find in the documentation whether I risk running into race conditions. For instance when the workers extend the same data entry simultaneously, which can theoretically happen, while with low propability. Atomic opertations and syncronization or mutexes are not mentioned in the documentation (at least for write access?), which is a little bit scary.
To ask more precisely, is Matlab doing its operations atomic (thread safe) for ValueStore functions? And, where does ValueStore store its data exactly - the documentation only mention where it is not stored? Is it stored on local persistent storage relying on OS for cache and performance?
Accepted Answer
More Answers (0)
Categories
Find more on Startup and Shutdown in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!