OSDev.org
https://forum.osdev.org/

Non-intterupt driven OS
https://forum.osdev.org/viewtopic.php?f=15&t=56692
Page 2 of 2

Author:  eekee [ Sat Feb 04, 2023 4:02 am ]
Post subject:  Re: Non-intterupt driven OS

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.

Page 2 of 2 All times are UTC - 6 hours
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/