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

Harvey J. Stein abel@netvision.net.il
Thu, 1 May 1997 17:13:12 +0300


Ian Ross writes:
 > 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.

What makes you think the machine won't go to pieces if you do
something wrong in a device driver?  Poking the wrong number into a
networking card and you *are* liable to crash the hardware.  I'd
expect that this is the most common type of bug when writing device
drivers, given the lousy documentation that is given out by hardware
companies, not to mention the lousy hardware itself.

On the other hand, other common bugs such as out and out memory
leaks (you could have pseudo-memory leaks such as repeatedly putting
the same thing on an alist...) won't occur, and when there is a
straight software bug (such as referencing past the end of an array),
the system will hopefully drop into the debugger so you can fix it and
try again, rather than rebooting and trying again.

But, when you're working on a device driver that's kernel module, if
its failure doesn't crash your system, you can unload it, edit it,
recompile it, and load it back in.

So, yes, there are advantages, but I don't think they're as large as
you indicate.

-- 
Harvey J. Stein
Berger Financial Research
abel@netvision.net.il