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 187around the notion of a directory. A directory is a list of pairs that can be searched by thefirst element, called the key, to derive the second. In the case of files, a directory is a listof file names (the key) along with other information about the file, such as who owns it,how long it is, who is allowed to access it, or where it is stored on the physical disk.Directories are often stored as files themselves, but these files are treated specially by thefile manager.1.1 One-level (flat) directoriesSome operating systems use one master directory for all files. Since all file names appearin a single directory, we say the directory has one level. Since all file names are searchedby the same method, we say the directory is flat. Such a directory structure is shown inFigure 6.1. This figure shows file names stored in a master directory, which then pointsto where the files are actually stored.A flat directory structure forbids two files to have the same name. This restrictioncan make it difficult for users to invent reasonable names for files. However, if there areenough components in the name, there is no difficulty. For example, the Univac Exec-8operating system has a flat directory structure, but each file name has three components.The first component is, by default, the owner’s personal identifying number. Most filesare created with only two user-selected components, and two users may choose the samenames. In fact, default selections are available for those two components as well; thesedefaults lead to temporary files that are deleted at the end of the day or when the sessionends.Master directoryfilessoftware.fortran.runsmith.simulate.fortransmith.simulate.runsmith.chapter1.textsmith.mail.textsmith.slide1.texttroy.JIR.textFigure 6.1 Flat directory

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

Saved successfully!

Ooh no, something went wrong!