Thoughts on Multi-Symlink Concept

Bakul Shah bakul at bitblocks.com
Sun Feb 23 20:10:44 UTC 2014


On Feb 22, 2014, at 7:13 PM, Jordan Hubbard <jordan.hubbard at gmail.com> wrote:

> Indeed.  I often tell interns who are looking for interesting project ideas to simply look back into our own past.  Almost all the really interesting and cool research activities where operating systems are concerned seems to have happened between the years of 1970-1990.    Sprite, Plan 9, Mach (hey, file space name servers anyone?), Domain OS, all kinds of neat ideas that sadly died or were forgotten in the name of consolidation, performance and expedience.  Indeed, the performance of some of those concepts was actually rather woeful when 4MB of memory and 1MIP were all you one to work with.  Maybe now that we have more hardware horsepower than we almost know what to do with, it’s time for some of those ideas to enjoy a renaissance?   Sounds like a good EuroBSDCon or BSDCan talk. :-)

Plan9 is alive and well! Well, at least used by a small but
a diverse group of people! And with the advent of the plan9
RaspberryPi port I see new people playing with it!

With Plan9 style per process name space, 9P protocol (to
easily construct a filesystem API for anything), mount()
syscall to connect to a fileserver speaking 9p, and bind()
syscall to overlay/underlay a filetree on another, you can
achieve the equivalent of variant symlinks and much more!
You can easily implement a 'multi-symlink' fs as well!

On plan9 all device drivers also speak 9p so you can even
mount a remote network stack on your local machine (no need
for NAT!). User programs such as rio (a window manager) and
acme (an editor) also provide FS access to their facilities  
which makes it easy to write scripts to interact with them.

Some examples:

bind $ARCH/bin /bin     # now files in $ARCH/bin appear in /bin

mount /srv/dump /n/dump dump # make the dump fs available at /n/dump
bind /n/dump/2013/11/12/arm/lib/libc.a /arm/lib/libc.a
5c -o foo foo.c         # now foo is linked with libc.a of 12-Nov-2013

9fs sources     # /n/sources points to sources/ on sources.cs.bell-labs.com
bind /n/sources/plan9/sys/src /sys/src  # overlay on local /sys/src
 
There is already support for 9P in Linux, Qemu and few other
places as it is pretty simple to add.  UCB's many core 
research OS Akaros is using 9p and the network stack from
plan9.

If anyone is inspired to add 9p & friends support to FreeBSD,
I encourage you to play with plan9 on the RaspberryPi as it is
pretty easy to use and lots of fun. [Kernel compile takes a
minute on the RasPi.  The equivalent of `make buildworld
buildkernel' about 4 minutes. Of course, the system is pretty
minimal]




More information about the freebsd-hackers mailing list