Page 62 - DCAP602_NETWORK_OPERATING_SYSTEMS_I
P. 62
Network Operating Systems-I
notes Whether the file system has an underlying storage device or not, file systems typically have
directories which associate file names with files, usually by connecting the file name to an index
into a file allocation table of some sort, such as the FAT in an MS-DOS file system, or an inode in
a Unix-like file system. Directory structures may be flat, or allow hierarchies where directories
may contain subdirectories. In some file systems, file names are structured, with special syntax
for filename extensions and version numbers. In others, file names are simple strings, and per-file
metadata is stored elsewhere.
Other bookkeeping information is typically associated with each file within a file system. The
length of the data contained in a file may be stored as the number of blocks allocated for the
file or as an exact byte count. The time that the file was last modified may be stored as the file’s
timestamp. Some file systems also store the file creation time, the time it was last accessed, and
the time that the file’s meta-data was changed. (Note that many early PC operating systems did
not keep track of file times.) Other information can include the file’s device type (e.g., block,
character, socket, subdirectory, etc.), its owner user-ID and group-ID, and its access permission
settings (e.g., whether the file is read-only, executable, etc.).
The hierarchical file system was an early research interest of Dennis Ritchie of Unix fame; previous
implementations were restricted to only a few levels, notably the IBM implementations, even of
their early databases like IMS. After the success of Unix, Ritchie extended the file system concept
to every object in his later operating system developments, such as Plan 9 and Inferno.
Traditional file systems offer facilities to create, move and delete both files and directories. They
lack facilities to create additional links to a directory (hard links in Unix), rename parent links
(“..” in Unix-like OS), and create bidirectional links to files.
Traditional file systems also offer facilities to truncate, append to, create, move, delete and in-
place modify files. They do not offer facilities to prepend to or truncate from the beginning of a
file, let alone arbitrary insertion into or deletion from a file. The operations provided are highly
asymmetric and lack the generality to be useful in unexpected contexts.
Example: Interprocess pipes in Unix have to be implemented outside of the file system
because the pipes concept does not offer truncation from the beginning of files.
Secure access to basic file system operations can be based on a scheme of access control lists or
capabilities. Research has shown access control lists to be difficult to secure properly, which is
why research operating systems tend to use capabilities. Commercial file systems still use access
control lists.
Task “A file system can be used to organize and represent access to any data,
whether it be stored or dynamically generated.” Describe
3.3 access methods
There are several ways that the information in the file can be accessed. Some systems provide only
one access method for files. On other systems, many different access methods are supported.
3.3.1 sequential access
Information in the file is processed in order, one record after the other. This is by far the most
common mode of access of files. For example, computer editors usually access files in this fashion.
A read operation reads the next portion of the file and automatically advances the file pointer.
Similarly, a write appends to the end of the file and the file pointer. Similarly, a write appends to
56 LoveLy professionaL university