Non-intterupt driven OS

Discussions on more advanced topics such as monolithic vs micro-kernels, transactional memory models, and paging vs segmentation should go here. Use this forum to expand and improve the wiki!
User avatar
eekee
Member
Member
Posts: 872
Joined: Mon May 22, 2017 5:56 am
Location: Kerbin
Discord: eekee
Contact:

Re: Non-intterupt driven OS

Post by eekee »

AndrewAPrice wrote:You could write your code very asynchronosly. e.g. JavaScript style where everything is async/await. You would still get crashes in true infinite loops, but at least your code blocks would be fairly granular.
I evidently need to learn asynchronous coding. I've been held back by a very strong preference for orderly linear languages, but this asynchronous style seems to have some big advantages.
AndrewAPrice wrote:I also recall an "OS" named GIMI written in QBasic that would achieve multitasking by round-robin interpreting each script.
Oh that takes me back! When my only tool was QBasic, I thought of implementing multitasking in that way too. These days, I'd describe it as overloading termination to function as yielding to the OS. Not necessary if you have control of the language, but it could keep code granular.

Schol-R-LEA wrote:Niklaus Wirth got a bee in his bonnet about interrupts and determinism in the mid-1980s, so the Oberon OS and language was designed entirely around cooperative multitasking. The language and the OS are tightly interwoven, with the compiler designed to automatically insert passes into the program at regular intervals - specifically, any loop would end by passing to the scheduler, or at least do so after a certain number of iterations. Needless to say, this method is highly dependent on that specific compiler being used for everything.
I've long been planning to use a single compiler for everything, not least because it has some interesting possibilities including inserting passes (or yielding, as I tend to call it). Deciding when to yield still seems to me to be a complex issue, but evidently solvable -- Oberon was very responsive when I tried it.
Kaph — a modular OS intended to be easy and fun to administer and code for.
"May wisdom, fun, and the greater good shine forth in all your work." — Leo Brodie
Post Reply