3 ms·
I used to think that naming things, cache invalidation, and off-by-one errors were the 2 biggest problems in CS, but then I learned about the "sleep/wake" probl
by dekhn 2y ago
I used to think that naming things, cache invalidation, and off-by-one errors were the 2 biggest problems in CS, but then I learned about the "sleep/wake" problem and realized it's NP-complete.
- nikanj 2y agoOnly on Linux though, on Windows it’s O(n2) and on Macos it’s O(log n)
- itsn0tm3 2y agoWell only as long as you don‘t hackintosh. That stuff used to be a horror sometimes!
- 0x38B 2y agoRemembering the hours I spent going through KEXTs and bootloader config in ill-fated attempts to set up a Hackintosh fills me now with a kind of horror. Worst of all were the ACPI tables - SSDT and the like. In contrast to that, running MacOS in a VM is heaven. Figuring out how to pass my iPhone through to Xcode took as long as the initial setup.
- ncann 2y agoWith how much trouble I had with trying (and failing) to make my brand new Dell laptop sleep properly and not the "Modern Standby" crap, plus my desktop randomly breaking GPU hardware acceleration in browser after waking up, I would say it's around O(n4) now. Or maybe even O(n!).
- verall 2y agoI think sleep/wake is a subset of cache invalidation - if all peripherals were stateless, probably it wouldn't be an issue.