3 ms·
You don't even need a timer interrupt, if userspace is well-behaved. Especially if user input is interrupt-based (think ^C to cancel; triggers context switch -
by moonchild 6y ago
You don't even need a timer interrupt, if userspace is well-behaved. Especially if user input is interrupt-based (think ^C to cancel; triggers context switch -> signal, can also have a kernel fallback for buggy userspace that tries to ignore the signal and refuses to yield).
- dfox 6y agoWhat you need timer interrupt for is “true” preemptive multitasking/threading. For many applications that makes quite large difference in programmer comfort (ie. you can just run CPU-bound computation without any regard to yielding to other tasks). On the other hand you can successfully create create multitasking-like user experience without any OS level support for that simply by making everything event-driven.
- slackfan 6y agoThe userspace, however, can never be assumed to be well-behaved.