[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Moving away from /dev ?



On Fri, 16 Apr 1999, M.C. Vernon wrote:
> Yes; I agree with this, but ATM we have a vast pile of apps to port - and
> if there is some support of /dev/foo, then it saves us having to rewirte
> chunks of apps that need /dev/foo: sure there may well be a better way to
> implement things like CD players, but a port of the linux ones is
> probably a quick fix (and I would suggest that the work spent on writing a
> CD player couldbe better spent elsewhere...)

While I agree in principle, I must again voice disagreement:

Appropriate use of translators will allow us to provide an emulation
layer that "looks like" a unix or linux machine - a layered translator
for that process and that process only (like plan9) that would create
all these necessary devices.

Also, I think that one of the main points of a ystem like Hurd is that
we are attempting to create a flexible, well designed, and adabtible
system.  Unix in general has reached it's limits of flexibility and
adaptibility, and Linux brings along an even greater host of flaws,
magic-number-handwaving style dependencies, and other uncleanlyness -
to implement these in teh same way that linux does would be pointless.

For example, in the case of cd players:

In linux-land:

cdplayer -> /dev/cdrom -> (major and minor of /dev/cdrom) -> kernel

In Ideal-Hurd-Land

cdplayer -> /dev/cons/cdrom0 -> 
  ( settrans -a /dev/cons/cdrom /bin/devices/scsi/cdromdriver
     /dev/scsi0/4) ->
  ( settrans -a /dev/scsi0 /bi/devices/scsi/scsicard-driver
    /devices/pci@0/0x4000,a )

Why's this cool?  because I could go and mount the cdrom drive from the
lab cdrom player machiine and run it myself - using my own cdrom code.
I could even, If we come up with a good distributed namespace protocol,
write a userland server protocol and natively access the cdrom drive
on my solaris box from my hurd box and the solaris box wouldn't know any
better and it'd be transparent on the solaris box

I could go and add monitors from other machines to my box through the
network simply by stuffing them into /dev/console.  or keyboards,
or mice.

And, to top this off, one can write a simple translator that's simply
a remapper - it sucks in a filename, sees if it wants to rename it
something else, and passes that filename below it.  A symlink filesystem,
if you will.  (this will be easy to implement - wwe might have minor
isues w/ precedence, but that's it)

Kevin Ho



Reply to: