linux-mips-fnet
[Top] [All Lists]

Re: Device Drivers

To: linux-mips@fnet.fr
Subject: Re: Device Drivers
From: Matthias Heidbrink <mh@cs.tu-berlin.de>
Date: Sun, 20 Dec 1998 14:30:09 +0100 (MET)
In-reply-to: <Pine.LNX.3.96.981219151529.27344F-100000@apt4g.a3nyc.com> from "Thomas Riemer" at Dec 19, 98 03:22:55 pm
Hi Thomas,

> The whole industry of device drivers seem like a bizarre activity to me.
> Some thought questions:
> 1. Why does a person have to write a different device driver for each
>    Unix variant?

Because there is no standard interface?-(

> 2. Why does a person have to reinvent the handling routines for timers,
>    and interrupt handling?  (Or in my case cut and past from some other
>    driver)

It might look odd, but it makes sense. Windows NT has got a very "clean" 
I/O architecture that encapsulates such stuff into DLLs which belong to the
operating system (and can be exchanged for unusual hardware like proprietary 
multiprocessor architectures, ...). 
This should make it much easier to write device drivers and
to port them across different hardware platforms. But there is a constant 
overhead for every I/O operation. If you compare the I/O performance of the
same hardware running NT and running OS/2 or some UNIXes, this seems to have
not been a very good idea.
Microkernel systems like Mach had similiar problems. As far as I know, the 
architecture allows to run some driver stuff as a user process, but the Mach 
people put much driver stuff into the kernel for performance reasons.

> 3. Wouldn't make a whole lot more sense to write a device
>    driver generator - where you feed it a configuration file - and it
>    generates the appropriate C driver code with
>    the appropriate hardware specific code in the write places...

The same problem as with much other good ideas: Seems to be a good idea, but 
someone has to do it. And I'm quite sure that a hand-written driver will
offer much better performance if the programmer writing it knows what he's 
doing.

Ciao, Matthias
-- 
Matthias Heidbrink     E-Mail: 
Helmstedter Str. 20    Matthias_Heidbrink@b.maus.de   (max. 16 KB/day)
10717 Berlin, Germany  mh@cs.tu-berlin.de         
Tel. +49-30-8536361    mh@carano.de   (at work; http://www.carano.com)
       Offene Liste Informatik: http://autos.cs.tu-berlin.de/OLI/

<Prev in Thread] Current Thread [Next in Thread>