13.07.2015 Views

An Operating Systems Vade Mecum

An Operating Systems Vade Mecum

An Operating Systems Vade Mecum

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Naming structure of files 193give her one account and let her subdivide her files between the thesis and course projects.The course files might themselves be divided among the various courses she is taking.At a higher level, the files on the computer may be divided between those needed bythe operating system (like source files for the kernel, documentation on the text editor, orsoftware such as the Fortran compiler) and those needed by users (letters, programs forprojects, documentation, mail).A tree is an elegant arrangement for these divisions. We distinguish two types ofnodes in the tree: directories and ordinary files. A directory can have children (subnodes),a non-directory cannot. Directories may be empty. Figure 6.3 shows how thefiles we have been discussing might be placed into a hierarchical structure. As you cansee, files are not restricted to lie at a particular level in the hierarchy. The top few levelsof the directory structure tend to have a lot of directories, but ordinary files can residethere, too.In a hierarchical directory structure, absolute names are often clumsy. They arestill necessary because we need a way to distinguish a mail file in Mary Smith’s directoryfrom a mail file in Helen Troy’s directory. We build the absolute name of a file by startingat the root of the tree and naming all the directories on the path to that file. The lastpart of the full name is the local name of the file. We will separate the intermediatenames by the / symbol, as before. The files in Figure 6.3 have these full names:rootsoftwareusersutilitiesfortran.runsmithtroymailthesiscoursespaperssimulate.forsimulate.runchapter1.textslide1.textJIR.textsmith.text/users/smith/thesis/chapter1.textFigure 6.3 A hierarchical directory structure

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!