Subject: Re: Is it feasible to use Lisp to write an OS?
From: (Rob Warnock)
Date: Wed, 09 Jun 2004 03:57:46 -0500
Newsgroups: comp.lang.lisp
Message-ID: <>
Svein Ove Aas  <> wrote:
| Rob Warnock wrote:
| > Svein Ove Aas  <> wrote:
| > +---------------
| > | ...writing a simple OS from scratch.
| > But seriously, coding up drivers (except perhaps a few simple ones,
| > as proofs-of-concept), not to mention filesystems, is a *LOT* of work.
| > It would probably be better to spend your time on the "middle" layers
| > of the operating system: process scheduler, memory management, etc.
| > 
| > For the low-level driver stuff, may I suggest using the Utah OSkit
| You certainly could, except for the whole "university project" thing.
| I'm not allowed to use it.

That's idiotic on the part of your instructors, then!! Modern hardware
is *complex*! (...unless you're going to restrict yourself to 80x86
"real mode" and a serial port for I/O.) You're going to *have* to look
at *some* existing source code, if only to get the register definitions
and the algorithms for how to talk to the hardware.[1] (...unless you work
only from chip manufacturers' data sheets, which are nearly impossible
for end-users to obtain!!!) Hand-translating all that crap into Lisp
just because your O/S is to be "from scratch" is like taking a chemistry
practicum where you're not permitted to use commercially-available
glassware, reagents, or test strips!! (*Sheesh!*)

Why not at least take a brief look at what OSkit[2] gives you in the
way of the lowest-level drivers, and consider how you might build the
infrastructure those drivers depend on in Lisp [so that the "operating
system" -- which manages all of that -- is at least all yours], then
go ask your instructors if using *just* the lowest-level driver code
(and supporting headers!) would be considered "fair"...


[1] If you're planning on running on any fairly recent Intel-based
    platforms (e.g., any current laptop), you may *have* to look at
    somebody's ACPI implementation [such as the Intel reference code],
    or you might never be able to get the machine to boot at all!!

[2] Or perhaps the directories /usr/src/sys/i386/{acpica,apm,i386,isa}/
    plus /usr/src/sys/contrib/dev/acpica/ from a FreeBSD distribution,
    as an alternative.

Rob Warnock			<>
627 26th Avenue			<URL:>
San Mateo, CA 94403		(650)572-2607