- Think of a disk as a linear sequence of fixed-size blocks and supporting reading and writing of blocks.
- The OS abstracts from the physical properties of its storage devices to define a logical storage unit, the file.
- A file is a named collection of related information that is recorded on secondary storage, usually as a sequence of bytes, with two views:
- Logical (programmer) view, as the users see it (how they are used and what properties they have.).
- Physical (OS) view, as it actually resides on secondary storage.
- The information in a file is defined by its creator. Commonly, files represent programs (both source and object forms) and data.
- Data files may be numeric, alphabetic, alphanumeric, or binary.
- Files may be free form, such as text files, or may be formatted rigidly.
- In general, a file is a sequence of bits, bytes, lines, or records, the meaning of which is defined by the file's creator and user.
- A file has a certain defined structure, which depends on its type.
- A text file is a sequence of characters organized into lines (and possibly pages).
- A source file is a sequence of subroutines and functions, each of which is further organized as declarations followed by
executable statements.
- An object file is a sequence of bytes organized into blocks understandable by the system's linker.
- An executable file is a series of code sections that the loader can bring into memory and execute.
Subsections
Cem Ozdogan
2011-02-14