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

Cooperative multitasking
https://forum.osdev.org/viewtopic.php?f=15&t=43334
Page 1 of 1

Author:  0b1 [ Sun May 02, 2021 8:34 am ]
Post subject:  Cooperative multitasking

My goal is to build a cooperative multitasking OS.

It will compile from byte code similar to JVM and CIL and the cooperation will be built-in.

My thinking is that taking it out of the hands of the programmer and putting it under the control of the OS will prevent or reduce the instabilities we saw back in the days of Windows 9x, which gave CMT a bad rep.

The plus side for me is a lot less task switching, stack operations, cache flushes, etc. at the hardware level, all of which is very expensive in an OS designed for virtualization - already running on top of an OS that has the CPUs doing a lot of that for its own purposes with extra for the purposes of virtualization.

Anyone see any flaws in my thinking, or have tried the same thing and run into the same problems as 9x

Author:  Schol-R-LEA [ Sun May 02, 2021 10:48 am ]
Post subject:  Re: Cooperative multitasking

You might want to look at the Oberon operating system, which worked in a similar way; for some reason, Dr. Wirth had decided that interrupts were an ugly hack, so he designed the language and OS to avoid them. The compiler for the Oberon language would automatically insert yields into the code, ensuring that the OS scheduler would frequently run even without any timer interrupts.

Author:  0b1 [ Wed May 05, 2021 1:40 pm ]
Post subject:  Re: Cooperative multitasking

Interesting link Schol-R-LEA - Thanks!

I feel the same way about interruptions. A lot of pushing and popping right when when I'm at my busiest.
Sounds like an Amazon delivery, while I in the middle of a complicated all-consuming problem.

It's good to know others think alike, even if it is is does fly in the face of current thinking. I do the same with Physics.

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