Hacker News new | ask | show | jobs
by petke 3786 days ago
Truly deterministic multithreading is really just single threading. Multithreading is by its nature undeterministic. To make it deterministic you really have to synchronize enough until just one thread at a time is making progress. It kindof defeats the purpose of multithreading. Synchronization is the enemy of scalability. You want to avoid it at all costs.
2 comments

That's true if all operations and intermediate states must be determistic, but if instead you only need some things to be deterministic then the cost is a lot lower. For instance, if you spawn a bunch of threads and join in them in the same order they were created, the order of the results you gather from them can be always be the same even if they didn't complete in the same order. The computation phase didn't pay any synchronization cost, but the gathering phase did
This is debatable, SIMD instructions and GPUs are highly synchronized, yet they do help with scalability.
Fair enough. I was talking about synchronisation of threads though.