* [hack] OCaml can be used to write kernel modules into KOS
@ 2005-01-16 14:11 David MENTRE
0 siblings, 0 replies; only message in thread
From: David MENTRE @ 2005-01-16 14:11 UTC (permalink / raw)
To: caml-list; +Cc: Thomas Petazzoni, david.decotigny
Hello,
For the fun, I have ported the asmrun/ directory of OCaml to a small
operating system, KOS (http://kos.enix.org/). This allows to run native
mode OCaml programs (i386 arch) as KOS kernel modules.
The binding is rather limited, it is more a quick & dirty hack:
- no I/O;
- no threads;
- no access to KOS ressources;
- no floats;
- no int64;
- due to lack of realloc, I have hacked the GC code and I'm pretty sure
I have overlooked details;
- other missing things I have forgotten...
Most of those missing functionalities could be implemented, either by
stealing code from glibc/gcc or by writing emulation code. However I do
not plan to do that job. OCaml badly supports concurrent accesses due to
locking in GC (if I have understood correctly) so it can be of dubtious
use in an operating system. Note however that, as written, this code
could be used to write several /independent/ modules written in ocaml.
I have put modified source code at:
http://www.linux-france.org/~dmentre/kos/module_ocaml_asmrun.tar.gz
(asmrun license: LGPL)
This tarball includes a diff that documents changes I've made on
original ocaml source code. It could be of some use if somebody wants to
do the same hack in another operating system.
Yours,
david
--
pub 1024D/A3AD7A2A 2004-10-03 David MENTRE <dmentre@linux-france.org>
5996 CC46 4612 9CA4 3562 D7AC 6C67 9E96 A3AD 7A2A
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2005-01-16 14:11 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-01-16 14:11 [hack] OCaml can be used to write kernel modules into KOS David MENTRE
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox