4 ms·
Why is reading plain text out of /dev/mouse and writing plain text to /dev/draw an improvement over how Linux or OS X or Windows does it? Because it has nothin
by vezzy-fnord 11y ago
Why is reading plain text out of /dev/mouse and writing plain text to /dev/draw an improvement over how Linux or OS X or Windows does it?
Because it has nothing to do with the way other OS implements files. The kernel is effectively an I/O and network multiplexer for synthetic file systems that abstracts common resources to enable location/network transparency, single system imaging and interface uniformity. This is done through the use of the 9P protocol, and process boundaries and file system hierarchy are enforced through namespaces.
9P is cacheable, stateful, encryption/auth-agnostic and can run over any transport layer.
This actually has far more consequences than "everything is a file":
a) There are no symlinks. You don't need them.
b) There is no root or superuser. You don't need it.
c) Your applications don't necessarily need to be network-aware.
d) Remotely debugging, migrating or copying a system resource is as simple as a mount and it will just work.
e) There are no sockets. You don't need them. You have ndb.
f) There are no ioctls.
g) Networking information being a file server obsoletes the need for NAT and VPN, among other things. [1]
Then, of course, the Plan 9 userland is great. Plumbing, a compiler chain that makes cross-compilation stupidly easy (so much so that OpenBSD considered using it but backed away because of the Lucent license at the time), the acid debugger, mk, Venti, etc.
[1] http://cm.bell-labs.com/sources/contrib/uriel/slides/fosdem06/slides.pdf http://cm.bell-labs.com/sources/contrib/uriel/slides/fosdem0...