Introduction
 

Naming in Mungi


Charles Gray

cgray@cse.unsw.edu.au

Introduction
1

Naming in UNIX
 

Everyting is a file!


... right?
Naming in UNIX
2

UNIX Namespaces
 
  • File namespace

  • Each file iteself

  • Processes

  • Device major/minor numbers

  • System V IPC namespace

  • Network names

Naming in UNIX :: UNIX Namespaces
3

Windows Namespaces
 
  • Rooted in the manky DOS ways
  • c:\, d:\

  • Now over-engineered
  • ... but still manky

  • NT has an internal unified namespace
  • \\

  • DOS emulation mapped in
  • \\Win32\...\c:\blah

  • Not a whole lot different, however

Naming in UNIX :: Windows Namespaces
4

The brokeness of UNIX
 
  • /proc

  • mount/umount

  • reference counted hard-links

  • symlinks

  • $PATH
  • and LD_LIBRARY_PATH and TEXINPUTS and ...

  • '..'

Naming in UNIX :: The brokeness of UNIX
5

Symlinks
 
  • Symlinks take a nice DAG and introduce cycles
  • [draw a picture!]

Naming in UNIX :: The brokeness of UNIX :: Symlinks
6

'..'
 
  • ".." at mount points and symlinks is a hack
  • [draw a picture!]

Naming in UNIX :: The brokeness of UNIX :: '..'
7

The Plan-9 Way (and now Mungi way)
 
  • Fix PATH

  • Fix ".."

  • Fix symlinks

The Plan-9 Way (and now Mungi way)
8

Fixing PATH
 
  • Only exec out of /bin

  • Map /bin to be whatever you need
  • union directories

  • Per-process namespaces
  • [draw a picture]

The Plan-9 Way (and now Mungi way) :: Fixing PATH
9

Fixing Symlinks
 
  • Allow a 'bind' operation
  • Linux has now stolen this :)

  • No more cycles
  • [draw a picture]

  • Can span filesystems

The Plan-9 Way (and now Mungi way) :: Fixing Symlinks
10

Fixing '..'
 
  • Take a purely lexical approach

  • /home/user/foo/../bar

  • No longer require parents to actually exist
  • May or may not be a good thing...

The Plan-9 Way (and now Mungi way) :: Fixing '..'
11

Advantages of the Mungi way
 
  • Names resolve to pointers

  • Names have no effect on the kernel
  • No reference counting

  • Name services can be implemented at user-level with complete distrust

  • How to differentiate pointers?

  • Names can be both a pointer and a directory

The Plan-9 Way (and now Mungi way) :: Advantages of the Mungi way
12

Unresolved Issues
 
  • Mungi is a SASOS

  • Now every thread can have its own private namespace!

  • WTF??

The Plan-9 Way (and now Mungi way) :: Unresolved Issues
13

End
 
Questions?
End
14