David Higgs wrote:
I'm not an advocate of threads, simply playing devil's advocate because you patently refuse to believe this is anything but a mutually exclusive proposition. Is it not possible to decompose a complex program into a well-secured multi-process program, where one process leverages threads to perform something simple, massively SIMD parallel, and easy to verify?
Yes, it is possible, and the SIMD case is the one where I would gladly admit the possibility that threads might be both useful and safe. That process would have to be well isolated and well defined as a byproduct of the decomposition. I didn't want to bring up SIMD because it is rare that people apply it strictly enough to be safe in this context. Also, given NUMA, the SIMD model is not necessarily the most efficient. The limited number of numerical problems I've dealt with could have the data set factored such that sharing was not necessary to achieve good throughput, but I can easily believe that there are many useful problems where this cannot be done. As I've said before, cost vs. benefit. The benefit in this case (large amounts of data shared amongst a large number of CPUs where otherwise a prohibitive amount of IPC would be necessary) and a low cost as a result of the symmetry of the problem could make it a good solution, if and only if the other parts of the program were suitably decomposed. Thank you for bringing up this very specific point. geoff steckel

