What kind of things would you want in the GNU OS
rroba.DlosLV at xerox.com
rroba.DlosLV at xerox.com
Sat Jun 10 16:40:39 AEST 1989
In message <14460.8906081609 at orchid.warwick.ac.uk>, somebody says:
>In article <19889 at adm.BRL.MIL> you write:
>> (I am assuming that everybody in the audience understands the impact
>> of a symbolic link on the amount of time required to open a file.)
>
>No, I don't -- can you explain it please
When you attempt to open a file, you specify a path name. Before the file
can be opened, the kernel must translate the file name into an inode number
(the inode must be obtained to determine the location and size of the file
on the disk drive). The inode number is recorded in the directory of the
file. So, the kernel must open (access) the directory to read the inode
number of the file; but before it can open the directory, it must first
determine the inode number of the directory . . . and so on to the root
directory. This process actually begins, of course, with the root
directory (at least in the case of absolute path names), and traces up to
the file (opening directories and extracting the next inode number along
the way).
In the case of symbolic links, this process is interrupted when the kernel
finds, in some intermediate directory, not an inode number, but an
alternate path name. At this point the kernel must begin again at the root
directory, retracing it's steps through another sequence of directories.
The difficulty of extracting an inode number from this sequence of
directories is further complicated in BSD systems by the complexity of BSD
directories, which are structured in a manner similar to a linked list (as
opposed to AT&T directories, which are more like arrays of structs).
More information about the Comp.unix.wizards
mailing list