This got really off topic. Not a single post on page 2 mentions "bytecode"!
Let's talk about:
1) JIT boot loaders!
2) Or a very minimal "exokernel" that basically an interpreter, so you can put as much logic as possible into a cross-platform bytecode kernel.
Kernel written in bytecode
- AndrewAPrice
- Member
- Posts: 2310
- Joined: Mon Jun 05, 2006 11:00 pm
- Location: USA (and Australia)
Re: Kernel written in bytecode
My OS is Perception.
Re: Kernel written in bytecode
I think bytecode in a micro- or exokernel has exactly the same problems as in a monolithic. No need to make that a special case.AndrewAPrice wrote: ↑Thu Jan 30, 2025 3:11 pm This got really off topic. Not a single post on page 2 mentions "bytecode"!
Let's talk about:
1) JIT boot loaders!
2) Or a very minimal "exokernel" that basically an interpreter, so you can put as much logic as possible into a cross-platform bytecode kernel.
Personally, I find the microkernel concept interesting because it can isolate drivers more properly than linking it into a flat, monolithic kernel, and not because it consists of an interpreter.
- Demindiro
- Member
- Posts: 98
- Joined: Fri Jun 11, 2021 6:02 am
- Libera.chat IRC: demindiro
- Location: Belgium
- Contact:
Re: Kernel written in bytecode
Instead of bytecode, why not go straight for a scripting language?
The interpreter would certainly be more complex, but a well-designed scripting language can be very easy to parse (e.g. LISP dialect). As a bonus, it would be easier to debug and, IMO more importantly, to modify. And realistically you probably want to translate it to native machine code anyway, so the relative added complexity will be low.
I'll also add that scripting language != slow or even dynamically typed. To me, a scripting language is mainly about being easy and quick to write, which might prove useful for making good-enough drivers quickly.
(Incidentally, the project I'm currently planning is related to this.)
The interpreter would certainly be more complex, but a well-designed scripting language can be very easy to parse (e.g. LISP dialect). As a bonus, it would be easier to debug and, IMO more importantly, to modify. And realistically you probably want to translate it to native machine code anyway, so the relative added complexity will be low.
I'll also add that scripting language != slow or even dynamically typed. To me, a scripting language is mainly about being easy and quick to write, which might prove useful for making good-enough drivers quickly.
(Incidentally, the project I'm currently planning is related to this.)
Re: Kernel written in bytecode
Which major OS has a Lua interpreter in the kernel? Was it Linux or FreeBSD? I can't remember.
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
"May wisdom, fun, and the greater good shine forth in all your work." — Leo Brodie