Figure 10:
(a) Single-Level Directory Systems (b) Two-Level Directory Systems (c) Hierarchical Directory Systems.
|
- A directory is a symbol table, which can be searched for information about the files. Also, it is the fundamental way of organizing files. Usually, a directory is itself a file
- A typical directory entry contains information (attributes, location, ownership) about a file. Directory entries are added as files are created, and are removed when files are deleted.
- Provides mapping between file names and the files themselves
- Goals in Organization of Directory
- Efficiency; locate file quickly
- Naming; convenient to users,
- 2 users can use same name for different files
- Same file can have several different names
- Grouping; logical grouping of files by attributes, (e.g., all Java programs, all games, ...)
Figure 11:
Example to (a) Single-Level Directory Systems (b) Two-Level Directory Systems (c) Hierarchical Directory Systems.
|
- Single-Level Directory Systems (see Figs. 10,11)
- List of entries, one for each file
- Sequential file with the name of the file serving as the key
- Provides no help in organizing the files
- Forces user to be careful not to use the same name for two different files
- Two-Level Directory Systems (see Figs. 10,11)
- One directory for each user and a master directory
- Master directory contains entry for each user; Provides access control information
- Each user directory is a simple list of files for that user
- Still provides no help in structuring collections of files
- Hierarchical, or Tree-Structured Directory Systems (see Figs. 10,11)
- Files can be located by following a path from the root, or master, directory down various branches; This is the absolute pathname for the file
- Can have several files with the same file name as long as they have unique path names
Subsections
2004-05-16