Changes between Version 1 and Version 2 of BigIdeas/Interrupts


Ignore:
Timestamp:
Nov 8, 2017, 8:07:01 AM (3 years ago)
Author:
schiptsov
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • BigIdeas/Interrupts

    v1 v2  
    33Interrupts is the way to do I/O.
    44
     5Interrupt handler is a procedure (a subroutine) attached via slot in a Interrupt Table to a particular hardware or software event. It is an isolated (withing a CPU context) lightweight process (with its own stack). This is ''the right way'' to do I/O. Not threads or async nonsense (over-abstraction).
     6
     7Most of the time there is nothing to do when data isn't here, so it is OK to block on receive. The main point is that blocking the whole process is too much (and threads are crap) so very lightweight, share-nothing coroutines, like interrupt handlers, is the right way.
     8
     9Since blocking on receive is OK, cooperative multitasking is also OK. This means that there is no need to explicitly schedule these processes by the kernel as truly independent entities - a program could do it itself. This simplifies everything and with simplicity comes robustness.
     10
    511-----
    612see also [wiki:/Buzzwords/Async]