Re:The Programming Interview from Hell
by kazinator on Monday February 20, 2017 @11:52PM
(#13693363)
Early versions of Unix were co-operative. While a task executed kernel code, it was not preemptable. That might be the simplest thread synchronization. Masking interrupts is then just for exclusion between the one and only kernel thread, and interrupt context.
Of course it fails if you're working in user mode. Or you have non-maskable interrupts that you need to sync with.
In this case the poor PhD x 2 had been working for years on consumer PCs, which were at the time nearly all single CPU. I'd been mucking about with multiprocessing a fair amount, and the IRQL thing never even occurred to me during the interview. Just as well.