OS File Structure
Files can be structured in several ways in which three common structures are given in this tutorial with their short description one by one.
File Structure 1
Here, as you can see from the above figure, the file is an unstructured sequence of bytes. Therefore, the OS doesn't care about what is in the file, as all it sees are bytes.
File Structure 2
Now, as you can see from the above figure that shows the second structure of a file, where a file is a sequence of fixed-length records where each with some internal structure.
Central to the idea about a file being a sequence of records is the idea that read operation returns a record and write operation just appends a record.
File Structure 3
Now in the last structure of a file that you can see in the above figure, a file basically consists of a tree of records, not necessarily all the same length, each containing a key field in a fixed position in the record. The tree is stored on the field, just to allow the rapid searching for a specific key.
« Previous Tutorial Next Tutorial »
Follow/Like Us on Facebook
Subscribe Us on YouTube