3 ms·
This is convenient but having the kernel block on userspace doing something is typically bad design :(
by saagarjha 4y ago
This is convenient but having the kernel block on userspace doing something is typically bad design :(
- throwawaylinux 4y agoIt really isn't. "The" kernel doesn't block, a context blocks and typically that context is associated with a user process (directly or indirectly). sleep(3) the kernel blocks for a time specified by userspace. futex(2) can cause the kernel to block until usespace wakes it. Similar wait(2). Also read(2) from a pipe or localhost socket. So whether or not it is a bad design depends highly on what gets blocked, in what situations, and what can be done to recover the situation if things misbehave.