David Leimbach wrote:

I have to learn more about channels and cloning in general to really "get it" I guess.

Dave, it's not that sockets are in a file system. It's that the interface to everything on plan 9 is the same -- in-kernel devices and out-of-kernel servers. So, in a very real sense, I talk to the sockets device the same way I talk to the RTC and the same way I talk over 9p to fossil -- and, hence, it looks like a file system. The set of ops for in-kernel devices looks pretty much the same as 9P ops. It's well worth reading.

Here's just one example why this can be nice. Every time we've needed a new address family on Unix or Linux -- think IPV6 or Infiniband -- we have to define a new set of binary structures, and then EVERY program that uses a sockaddr or library has to be hacked to deal with it. Just note that on linux 2.6.14,
ifconfig ib0 (infiniband iface)
and
cat /sys/class/net/ib0/address (or whatever the hell it is today)

give you DIFFERENT values for the MAC address. The ifconfig is missing (IIRC) 4 octets. This would not happen on Plan 9, because the string for the MAC would come straight out of the driver -- all programs, libaries, and so on will see the same thing. No binary interface, no kludgy case-variant structs, and so on.

A lot of unix or linux folks have not gotten this important point. It's not that everything goes in a file system, including device interfaces. It's that the interface to everything is the same -- including device interfaces. It's a very important distinction. It's also almost impossible to back-fit it into Unices at this point.

ron
p.s. I'm watching a great show on huge machines -- cranes, diggers, and so on. This looks more fun than computers to me just now. This one crane picked up the millenium bridge. Nice.

Reply via email to