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

Re: bind() and mount() confusion



My humble view:

bind() - is like a "Hyper ln" and "bind" can exist without "mount".
If you've experienced UNIX "ln" as in "ln -s" you have a rough
concept of a single namespace (i.e. shared by everyone on one box).
Then imagine you can dynamically create a new "virtual" (RAM)
namespace for each application (i.e. thread), or for each user on
a box. Then imagine you're not limited to link directories physically
(ln) or symbolically (ln -s) but you can merge directory contents
altogether (bind). You can decide to merge directory contents before
(-b) after (-a), or by replacement (-r) of existing ones, and you
can set the resulting "bound" directory to be writable (-c) (or not)
by the app, etc. So "bind" is both the ultimate OS level tool to
provide full OS view-pathing and the clean theoretical tool to
compose tree graphs reversibly (unlike tree surgery, bind is undone
when the namespace is recycled and only the new leaves stay on the
tree branches!) You're now grasping bind() and Inferno namespace.

mount() - makes other Inferno OS visible into your namespace.
And this means the whole OS becomes visible not just NFS, but
all resources (i.e. device drivers.) After using "mount" you use
"bind" to make the resources appear in the right place, you compose
a virtual view of a networked computer that fits your application. So
you can virtually run an app from anywhere, by adjusting its view of
the available world resources using "bind" after "mount".

Olivier