Académique Documents
Professionnel Documents
Culture Documents
And
What we can learn from it
Ron Minnich
Advanced Computing Lab
Los Alamos National Lab
LA-UR-05-4132
Unix
Simple open/read/write/close with streams
of bytes
Resources are named via a visible path
This is such an advanced concept that NT
still does not do it (try ls \devices
sometime)
It was also extremely controversial
Early Unix
Kernel
Process
UFS
Interface
UFS
Char
Interface
Char Device
Block
Interface
Block Device
So in Unix,
Everything is a file
Or so we thought
As it happened, the model broke down fairly
quickly
In our case, it happened with this:
(no picture)
The DEC DAC
Oh, heck
Did I say everything was named?
I lied
Un-named things:
Processes
File descriptors
Socket, bind
accept,listen
send, recv,
...
Basic Kernel
Socket
BAG
(as in Cat,
out of)
Later ...
more interfaces
Sockets
Kernel
VFS
Interface
Process
VFS
UFS
Char
Interface
Char Device
Block
Interface
Block Device
Then to now
Over the years, legacy mechanisms that
should have gone away did not
The basic input model is still a tty
Don't believe me? Type 'stty' at an xterm
and tell me why a window has a baud rate
Also, tell me why I can't edit the text in an
xterm window
Xterm window
Process
Window
You
Where we are
300 system calls and counting in Linux
Most are different types of entry points to
different subsytems, continuing the trend
started by sockets
Kernel layering gets more and more
complex, revision by revision
Sockets
And more
Other file system
Sysctl
Lotsa
Kernelstuff!
VFS
Interface
Process
VFS
sysfs
Char
Interface
Block
Interface
UFS
Char Device
Block Device
I know!
Let's put
devices
in the
file
system!
A better model
Kernel
Process
Server
Interface
Server
(i.e. process)
Device
9p2000 protocol
Example
Kernel
Mail
tool
Note: email file
system on top
of file system on
top of local
device. Any
component can be
made remote.
Server
Interface
Server (process)
for email file system
Server (process)
for local file system
Device
Process
os
The data is no longer operated on by the OS
What Plan 9 is
Not like anything youve seen
Not a mini-, micro-, nano-, or other fad kernel
Real-time scheduler
Simple and fast
Plan 9 structure
Process
File
System
Process
/net
Name Space
Process
Name Space
Kernel
Memory, NIC,
Protocols,etc.
Path
FD
close,dup, fsession, fauth, fstat, seek, stat, wstat
(i.e.chmod), pread, pwrite, fd2path
Other
Rfork, alarm, exits, noted, rendezvous,
Segattach, segdetach, segfree, segflush
Discussion
How disks look
Note lack of need for loopback mount
Fossil
What was I doing yesterday
Venti
Never lose a file again
Conclusion
Can an OS preserve the original simplicity
of Unix
Most things are paths; common access model for
different resources
More conclusion
So where were we in 1978?
In a pretty good place, but going the wrong way
Where are we
At the end of a long road, which may be ending (or
not)