Page 64 - DCAP602_NETWORK_OPERATING_SYSTEMS_I
P. 64
Network Operating Systems-I
notes 3.4 Directory structure
The directories themselves are simply files indexing other files, which may in turn be directories
if a hyerarchical indexing scheme is used. In order to protect the integrity of the file system in
spite of user of program error, all modifications to these particular directory files are commonly
restricted to the file management system. The typical contents of a directory are:
1. file name (string uniquely identifying the file), type (e.g. text, binary data, executable,
library), organization (for systems that support different organizations).
2. device (where the file is physically stored), size (in blocks), starting address on device (to
be used by the device I/O subsystem to physically locate the file);
3. creator, owner, access information (who is allowed to access the file, and what they may do
with it);
4. date of creation/of last modification;
5. locking information (for the system that provide file/record locking).
As far as organization, by far the most common scheme is the hyerarchical one: a multi-level
indexing scheme is used, in which a top-level directory indexes both files and other directories,
which in turn index files and directories, and so on. Usually this scheme is represented in the
form of a tree.
The hyerarchical architecture has disctinct advantages over a simple, one-level indexing one:
the tree structure can be effectively used to reflect a logical organization of the data stored in the
files; names can be reused (they must uniquely identify files within each directory, not across the
whole fle system); in a multi-user system, name conflicts between files owned by different users
can be solved by assigning to each user a directory for her own files and sub-directories, the so
called user’s “home” directory.
A complete indexing of a file is obtained by navigating the tree starting from the top-level, “root”,
directory, and walking along a path to the tree leaf coresponding to the file.
A “pathname” is thus obtained, which uniquely identifies the file within the whole file system.
Example: The pathname for file “File-6” in Figure 3.1 is “:Root-dir:Subdir-1:File-6”,
where a colon is used to separate tree nodes.
figure 3.1: tree representation of a Hyerarchical Directory structure.
Root-dir
File-1
File-2
Subdir-1
File-1
File-6
Subdir-2 Subdir-1
File-1
58 LoveLy professionaL university