The File System The File System provides device-independent I/O, storage with access protection, and uniform file-naming conventions. Device independence means that all I/O is performed in the same way, whether the ultimate destination or source is disk storage, another program, a printer, or anything else, in all cases. I/O is performed to or from files although those files can also be devices, data segments, or programs. Every file is an uninterpreted stream of eight-bit bytes. A file that is stored on a block-structured device, such as a disk, is listed in a catalog(also called a directorj) and has a name.
For each such file the catalog contains an entry describing the file's attributes, including the length of the file, its position on the disk, and the last backup copy date. Arbitrary application-defined information can be stored in an area called the file label Each file has two associated measures of length, the Logical EndofFile tf-ECFj and the Phy$icaiEndofFilep>EOF) The LEOF is a pointer tu the last byte that has meaningful data. The PEOF is a count of the number of blocks allocated to the file.
The pointer to the next byte to be read or written is called the file marker Since I/O is device independent, application programs do not have to take account of the physical characteristics of a device. However, on block- structured devices, programs can make I/O requests in whole-block increments in order to improve program performance. All input and output is synchronous in that the I/O requested is performed before the call returns. The actual I/O, however, is asynchronous, in that processes may block when performing I /a See Section 3.5, Process Scheduling, for more information on blocking.
To reduce the impact of an error, the File System maintains distributed, redundant information about the files on storage devices. Duplicate copies of critical information are stored In different forms and in different places on the media All the files are able to identify and describe themselves, and there are usually several ways to recover lost information. The Scavenger utility is able to reconstruct damaged catalogs from the information stored with each file. 2.1 File Names All the files known to the Operating System at a particular time are organized into catalogs. Each disk volume has a catalog that lists all the files on the disk.
Any object catalogued in the File System can be named by specifying the volume on which the file resides and the file name. The names are separated 2-1