To make things a little simpler than managing a large number of sectors, the operating system groups sectors together into a minimum allocation unit called a cluster. When a request to create a file occurs, the operating system allocates a cluster at a time until the all the data is stored. This raises a question. How are all the clusters of a file linked together?
The previous diagram also illustrates the linking of the file clusters in a chain, with the last cluster signifying that there are no more clusters allocated to the file.
One of the problems of using clusters as a minimum storage allocation unit is the wastage of space. Consider a cluster allocate of two sectors, each sector storing 1024 bytes (or characters). This means a minimum storage allocation of 2048 bytes. If you stored a file containing the phrase “Hello”, then this would result in 2043 unused bytes in the cluster (most operating systems store the length of the file, so there is no need to use an end of file marker, which would occupy an additional byte).
You might consider that a smaller allocation size based on the size of a sector would be more efficient. However, it becomes more complex to manage smaller cluster sizes and they take up more space (the table becomes larger and it takes more time to go through all the entries).
The operating system can maintain a table of cluster entries, and mark each cluster as either free or allocated. This was a technique used in the MS-DOS operating system.
Other operating systems maintain a linked list of free clusters, each free cluster pointing to the next free cluster. As clusters are allocated, they are removed from the free cluster list. When a file is deleted, the clusters that were allocated to it are added back to the free cluster list.
The Windows operating system supports the following file systems.
FAT | The MS-DOS operating system introduced the File Allocation Table system of keeping track of file entries and free clusters. Filenames where restricted to eight characters with an addition three characters signifying the file type. The FAT tables were stored at the beginning of the storage space. |
FAT32 | An updated version of the FAT system designed for Windows 98. It supports file compression and long filenames. |
NTFS | Windows NT introduced the NT File System, designed to be more efficient at handling files than the FAT system. It spreads file tables throughout the disk, beginning at the center of the storage space. It supports file compression and long filenames |
No comments:
Post a Comment
This is Good Computer Information Blog.they will give
best information about computer.