File System Architecture:
Information Types:
Different files store different types of data. Files types refer to the type of
information stored in the file. File can be executable program, object file, C
source code, word processing file and graphic etc. Files can be identified in
three ways:
1. Name Extension:
The name extension scheme identifies the information type by including a
particular extension as part of the filename, for example, '.exe' and '.com'
mean executable program and '.doc' means word document.
2. Magic Number:
Magic number scheme identifies information type by looking for a magic number.
Magic number may be a byte or sequences of bytes at a particular location in the
file. For example, the string "GIF8" at the start of a file means that the file
contains a GIF image data. Normally operating systems do not support this
mechanism. A particular application may use it.
3. Operating System Supported Information Type:
In this mechanism, operating system maintains the type as part of the
information associated with file. The type of the file is set when it is
created.
File System Architecture:
File management is organized in a number of levels. File is the highest level.
File is a collection of records. A record is a collection of information.
Operating system may support record structures of fixed-size or variable-size or
both. A record is a collection of fields. Field is a fundamental element of data.
Operating system considers a file as a collection of fixed-size logical blocks.
A block is the basic unit of I/O operation performed between disk and file
system memory buffers. The disk is a collection of physical blocks. Each
physical block stores a logical block.
|