News for hackers. Stuff that matters.
Re:The free lunch is over: a fundamental turn toward concurr... by limoce on Monday June 28, 2021 @09:25AM (#27661644)
There seems to be no way to efficiently replay concurrent programs in a deterministic fashion on multiple cores. Nondeterminism makes parallelism and concurrency inherently hard and unfriendly to new comers. It becomes even more difficult in recent years due to architecture decisions: weak memory order makes things worse.

Supposing you are going to write nontrivial concurrent programs like toy Raft, I believe that looking through RPC logs will be the most painful thing.

In contrast, on a single core, gdb is good enough. And there are also advanced examples like VMware's fault-tolerant VM and FundationDB's deterministic simulation. If we can debug concurrent programs without dirty tricks, just like single-threaded ones, I guess utilizing concurrency will be as handy as calling a function.

Re:The free lunch is over: a fundamental turn toward concurr... by aseure on Monday June 28, 2021 @09:50AM (#27661951)
> There seems to be no way to efficiently replay concurrent programs in a deterministic fashion

I wish there was something like Jepsen [1] broadly available to mainstream programming languages to do just that.

[1] https://jepsen.io/consistency

Re:The free lunch is over: a fundamental turn toward concurr... by Const-me on Monday June 28, 2021 @09:57AM (#27662026)
> no way to efficiently replay concurrent programs in a deterministic fashion on multiple cores

OpenMP with static scheduler and hardcoded count of threads?

OpenMP ain’t a silver bullet, but for many practically useful scenarios it’s indeed as simple as calling a function.

Re:The free lunch is over: a fundamental turn toward concurr... by hderms on Monday June 28, 2021 @10:35AM (#27662524)
what about if you throw in async IO into the mix? seems like you'd have to have some kind of vmware-like virtualization where you record all IO interrupts into a linearalizable log
Re:The free lunch is over: a fundamental turn toward concurr... by Const-me on Monday June 28, 2021 @11:04AM (#27662883)
When you throw async I/O in the mix it’s no longer just your application you’re debugging, it’s the whole OS with other processes, the OS kernel with these drivers and DMAs, and external hardware that’s not a code at all.

Can be tricky to debug or implement, but when I need that I normally use async-await in C#. The debugger in the IDE is multi-threaded, and does support these tasks.