English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

Browse thread
Re: [Caml-list] Kernel in OCAML using native compiler
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2001-12-31 (18:02)
From: Shannon --jj Behrens <jjinux@y...>
Subject: Re: [Caml-list] Kernel in OCAML using native compiler
> Read a good book on Garbage Collection (for instance
> Lins') and you'll
> find out that reference counting is the worst GC
> technique (except for
> some cases of distributed GC). It performs poorly
> and don't handle
> cycles.

Ok, thank you for explaining this to me.

> Ocaml's GC is one of the best and is tunable. It is
> generational,
> copying for the minor collection, and incrementally
> mark&sweep for the
> major collection.

For application development, it is quite nice.

> Even if you did happen to put a refcounting GC
> (which means rewriting
> Ocaml runtime and significant part of the compiler)
> you'll probably
> get worse performance.

In terms of overall time spent doing GC, I'm sure
you're right.  However, I imagine that there are other
algorithms that may provide lower latency (i.e.
shorter pauses caused by GC).  In providing GC for a
kernel, short latency is required, even if the GC will
eventually take twice as much time.

> Generally, using dynamic memory is perhaps not the
> best idea for a
> very low level kernel routine.

Perhaps.  However, I feel that there are some parts of
the kernel that could really benefit from GC.  

In specific, I'd really like to get rid of as many
limits as possible.  For instance, the number of
processes in Minix is fixed (requiring a recompile)
because the process table is not created dynamically. 
If some kernel level malloc were available, the
process table could grow as needed.  I understant that
this is not an "easy" problem.

> You should describe what are you wanting to
> implement in Ocaml inside
> a kernel.

Well, actually, my goal is to write a minimalistic
kernel almost entirely in a high level language like
OCAML.  It appears that many of my goals are the same
as the tunes project you mentioned (which I'm
currently reading through)--especially reflection (as
you mentioned).  

By the way, your first email to me mentioned the GC
issue, and despite three readings, it didn't sink in
until I starting doing those tests.  I apologize that
you had to repeat yourself ;)

Well, I'll keep learning.  Thanks for your patience.


Do You Yahoo!?
Send your FREE holiday greetings online!
Bug reports: http://caml.inria.fr/bin/caml-bugs  FAQ: http://caml.inria.fr/FAQ/
To unsubscribe, mail caml-list-request@inria.fr  Archives: http://caml.inria.fr