Device drivers (was First proposal: what should LispOS feel like?)

Ian Ross nnyrni@ny.ubs.com
Thu, 1 May 1997 09:46:11 -0400 (EDT)


Fare Rideau writes:
 > >: Mike McDonald
 > 
 > >   Eventually, I'd like to see everything except the device drivers be
 > > implemented in lisp. But that's a long, long term dream.
 > >
 > Why "except the device drivers"?
 > Once we have a running system,
 > a C->LISP translator could leverage existing code,
 > while allowing to debug it much more easily,
 > and integrate it better to the rest of the system.

Fare's right - there's no reason we can't translate device drivers
into Lisp, and for developing new drivers, it would be very nice to be
able to debug them in a Lisp environment where the machine doesn't go
to pieces every time you do something wrong.

There's a native PC version of the Oberon system where all the device
drivers are written in Oberon.  It's worth a look, if only for the
liberating idea that device drivers don't have to be written in C!

At the same time though, we do want to keep an interface that will
allow us to use existing Linux or BSD drivers.  When we start
migrating the lower-level stuff to Lisp, it might be worth considering
a segregation strategy like the one used in the Utah OS toolkit.

This has an adapter layer that maps between the world view of (say)
Linux kernel code and the native OSKit view of things.  This means you
can use a lot of Linux drivers without modification, even though the
interface to them from the outside may look very different from the
Linux interface.  (They do the same with the FreeBSD networking code.)

If we could produce a layer like this with Lisp bindings to the
outside, and Lisp and Linux/BSD/whatever C bindings to the inside, we
could selectively use low-level code from existing free OS's while
redeveloping bits underneath as we like.

  Ian Ross
  nnyrni@ny.ubs.com