Skip to content

Comment on How to Write Software with Zero bugs – 25 years after qmail 1.0 – D. Bernstein [pdf]parent

Comments

Single processors interleave threads using very coarse "quantums" of execution, where each thread runs for many milliseconds at a time. Dual processors will run the instruction streams truly in parallel.

From a correctness perspective, they're "identical", because even on a single core a context switch can occur anywhere. In theory, even one core can interleave individual instructions, it's just not done for performance reasons.

So if multiple cores causes a crash, then that crash bug was always there, and could have occurred even on a single core. It's just much less likely to be triggered.

Thankfully now every mainstream computer and practically all phones are multi-core, so software has to be written properly. The early 2000s were a mess though, with a lot of heisenbugs that were maddening to track down.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.