Page 3 of 3

Re: Kernel written in bytecode

Posted: Thu Jan 30, 2025 3:11 pm
by AndrewAPrice
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.

Re: Kernel written in bytecode

Posted: Fri Jan 31, 2025 7:31 am
by rdos
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.
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.

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.

Re: Kernel written in bytecode

Posted: Fri Feb 07, 2025 3:54 pm
by Demindiro
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.)

Re: Kernel written in bytecode

Posted: Fri Feb 14, 2025 7:50 pm
by eekee
Which major OS has a Lua interpreter in the kernel? Was it Linux or FreeBSD? I can't remember.

Re: Kernel written in bytecode

Posted: Wed Apr 16, 2025 6:29 am
by lambdart
Lunatik is a framework for scripting the Linux kernel with Lua.
It is composed by the Lua interpreter modified to run in the kernel;

https://github.com/luainkernel