Naming in Athena UNIX
by J. H. Saltzer, March 18, 1999, revised 3 April 2001 to make terminology consistent with the notes, revised again 29 January 2005 to again make terminology consistent with the notes.
Application of the naming model to interpreting an Athena UNIX command. Exercise: how many name resolutions are involved in typing this: attach 6.033 --------------let's use the 6.033 naming model to find out--------------- 1. name: attach naming scheme: UNIX command name name discovery method: Athena documentation interpreter: shell resolver: shell context reference: default, from the environment context: the PATH environment variable method: search (of each context listed in PATH) value: /bin/athena/attach 2. name: PATH naming scheme: environment variables name discovery method: decision of the shell programmer interpreter: shell resolver: environment variable library context reference: default, wired-in (the string "PATH" is coded in the shell) context: an array of environment variables and their values method: table lookup value: /mit/Saltzer/.local:/srvd/patch:/usr/athena/bin:/bin/athena:/usr/ucb:\ /bin:/usr/bin 3. name: /bin/athena/attach naming scheme: UNIX file system name discovery method: result of command name search in step 1 interpreter: UNIX file system resolver: UNIX directory name system context reference: default, wired-in context: the UNIX file system hierarchy on this computer method: path name scan value: inode # of attach 4. name: attach naming scheme: UNIX file system name discovery method: extracted from path name interpreter: UNIX directory name system resolver: UNIX directory lookup context reference: explicit (prefix of the path name) context: /bin/athena/ method: table lookup value: inode # of attach 5. name: /bin/athena/ (repeats attach, needs context /bin/) 6. name: /bin/ (repeats attach, needs context /) 7. name: / naming scheme: UNIX file system name discovery method: extracted from path name interpreter: UNIX directory name system resolver: UNIX directory lookup context reference: implicit, wired-in context: wired-in (the inode # of the root is coded in the directory name system) method: table lookup (one-entry table) value: inode # of root 8. name: inode # of attach [this takes us into the UNIX file system guts; we defer to Appendix A of chapter 5 for details, and assume that /bin/athena/attach is launched] 9. name: 6.033 naming scheme: Athena locker names name discovery method: read first 6.033 handout interpreter: attach resolver: Hesiod lookup library context reference: implicit, wired in ("filsys" is coded into attach) context: Hesiod's locker naming tables method: table lookup value: /mit/6.033 10. name: filsys 6.033 naming scheme: Athena locker name name discovery method: supplied in step 9. interpreter: attach resolver: Hesiod lookup library context reference: implicit, wired in ("NS.athena.mit.edu" is coded in) context: NS.athena.mit.edu method: concatenate name with context, send to DNS value: AFS /afs/athena.mit.edu/course/6/6.033 w /mit/6.033 11. name: 6.033.filsys.ns.athena.mit.edu naming scheme: DNS name discovery method: result of concatenation in step 10 interpreter: hesiod lookup library resolver: DNS context reference: implicit, wired-in (use of DNS is programmed into hesiod) context: the set of all DNS name tables method: path name scan value: AFS /afs/athena.mit.edu/course/6/6.033 w /mit/6.033 12. name: 6.033.filsys.ns.athena.mit.edu naming scheme: DNS name discovery method: from path name interpreter: DNS resolver: DNS client context reference: implicit, from environment context: configuration table listing the root name servers method: table lookup value: IP address of a root name server 13. name: 6.033.filsys.ns.athena.mit.edu naming scheme: DNS name discovery method: from path name interpreter: DNS resolver: DNS root name server context reference: wired-in (location of name tables) context: root and .edu domain name tables method: table lookup value: the mit.edu name servers... W20NS.mit.edu. 21600 A 18.70.0.160 BITSY.mit.edu. 21600 A 18.72.0.3 STRAWB.mit.edu. 21600 A 18.71.0.151 14. name: 6.033.filsys.ns.athena.mit.edu (repeats using athena.mit.edu nameserver) 15. name: 6.033.filsys.ns.athena.mit.edu (repeats using ns.athena.mit.edu nameserver) value: AFS /afs/athena.mit.edu/course/6/6.033 w /mit/6.033 attach can parse that result and install a soft link (indirect name) in /mit/ Answer: we found 15 name lookups, without exploring the depths of the UNIX file system to see how it converts inode numbers to disk block numbers and without following through the installation of the soft link Something equally lengthy, involving indirect names, AFS, and printer names occurs when we type the command lpr -ps /mit/6.033/handouts/handout-4.ps