9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: mycroftiv@sphericalharmony.com
To: 9fans@9fans.net
Subject: Re: [9fans] A note about new software for Plan 9
Date: Tue, 12 Mar 2013 03:17:37 +0000	[thread overview]
Message-ID: <320203de502d79e73cd7447f3ce25154@sphericalharmony.com> (raw)

erik quanstrom wrote:
> this part is confusing.  plan 9 has always maintained 1 independent
> namespace per process group.  so i'm surethat there's more to it
> than this.  could you go into detail on this?

You are right I was using terminology loosely here.  What I mean by
"namespace" in this context is the idea of a group of processes which
share a common namespace, and combine to create a user environment.
In other words, in a normal Plan 9 system, most of the processes are
aligned with the same root file system that the kernel acquired at
boot, and I'm loosely referring to this common root as "the namespace."

When I talk about running "multiple independent namespaces" with ANTS,
what I mean is using per-process namespace to do something similar to
BSD jails or a virtual machine.  The same Plan 9 kernel and machine
can have groups of processes running with different root filesystems.
If you create a group of processes that share a common root
filesystem, you have a user environment.

One thing that ANTS can do is to host multiple "namespace groups" on a
single machine.  Instead of having only one global namespace on the
machine with a single common root, you can host independent user
environments, each with a different root filesystem.

I know you (and others) are busy with plenty of obligations, but the
demos I have prepared with qemu vm images are designed to show in
practice how you can make multiple independent user environments on a
single plan 9 machine, then freely re-root which namespace you are
using.

So this part of ANTS is: running multiple userpsace environments on
the same machine.  You can do this because per-process namespaces
means that you can have a totally different root file system for one
group of processes than another.  To make this really work, the ANTS
9pcram kernel does not attach to a root filesystem itself.  The main
flow of control of the kernel "stands back" from the user's namespace
and does not attach to the same file descriptor that is the root of
the user fs.  This allows the main flow of control of the kernel to
act as a kind of "namespace hypervisor" that can launch multiple
indpendent user environments available at the same time on the same
machine.

To allow the user to actualy move between the different namespaces
freely, I have a script and parameterized namespace file called
"rerootwin" that acts as an instant Plan 9 chroot into a new
filesystem.  It avoids losing connection to the active window system
by passing the devices through a srvfs.  This means that even though
you might have Bell Labs and 9front running on the same box at the
same time, you can move back and forth at will, and enter either one
from a lower-layer kernel-only namespace.

This explanation was already kind of long and elaborate, but as I
mentioned I have virtual machine images and demo walkthroughs so you
can see how it actually works in practice, which is actually simpler
than the verbal description.

I'm not too good at balancing being precise and specific with keeping
things brief, so I hope this was a good answer without too much
unnecessary length.

Ben Kidwell
"mycroftiv"



             reply	other threads:[~2013-03-12  3:17 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-12  3:17 mycroftiv [this message]
2013-03-12  3:52 ` Bakul Shah
2013-03-12 14:57   ` Joel C. Salomon
2013-03-12 14:59     ` erik quanstrom
2013-03-12 18:27     ` Bakul Shah
  -- strict thread matches above, loose matches on Subject: below --
2013-03-13  2:51 mycroftiv
2013-03-12  4:20 mycroftiv
2013-03-12  5:56 ` Bakul Shah
2013-03-12 12:33   ` sl
2013-03-12  1:22 mycroftiv
2013-03-12  1:26 ` erik quanstrom

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=320203de502d79e73cd7447f3ce25154@sphericalharmony.com \
    --to=mycroftiv@sphericalharmony.com \
    --cc=9fans@9fans.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).