Operating System Fundamentals


Indexed Allocation Strategy



Download 2.34 Mb.
View original pdf
Page58/66
Date06.03.2023
Size2.34 Mb.
#60834
1   ...   54   55   56   57   58   59   60   61   ...   66
OperatingSystemFundamentals
best answers from c, Lesson 2 C# Windows Forms
Indexed Allocation Strategy
When using an indexed allocation strategy, the operating system creates a file directory to track all of the files on a disk, and an index block for each file. The file directory entry for each file includes the filename, just like with the contiguous and linked allocation strategies. However, instead of listing the starting block on the disk for each file, the file directory entry will include its index block number. The index block contains pointers to all of the data blocks belonging to that file. Again, the indexed allocation strategy has both advantages and disadvantages. Advantages of the Indexed Allocation Strategy Grouping all pointers in one place increases reliability. Makes direct access of the contents of a file more efficient. Disadvantages of the Indexed Allocation Strategy If a file is small, the index block containing all of the file pointers may contain a lot of wasted disk space. Figure 6.3 (below) shows the allocation of disk space, the File Directory and the Index Block fora sample file on a hard disk using the Indexed Allocation Strategy.
1
1
1
1
1
1
20
File Directory
File
Index
Block
File 1
20
File 2



The entry for File 1 in the
File Directory points to
Index Block 20.
Each entry in the Index
Block points to the location
on the hard disk of the next
piece of File 1.

Index
Block 20
3
12
5
11
14
8


Figure 6.3
Indexed File Allocation

Operating System Fundamentals
81 File Systems
File systems provide the conventions for the encoding, storage and management of data on a storage device such as a hard disk. They also provide the tools that help users to interact with files. Different operating systems use different file systems, and files created/stored using one file system are not always compatible with an operating system that uses a different file system. As discussed in Unit 2: Operating System Fundamentals, some of the more common file systems include FAT (floppy disks) FAT (DOS and older versions of Windows) FAT (older versions of Windows)
NTFS (newer versions of Windows) EXT (Unix/Linux)
HFS+ (Max OS X) Regardless of which file system an operating system uses, the file system provides the following conventions and information for file management Data and time the directory (folder) or file was created. Date and time the directory or file was last modified. Directory or file size. Directory or file attributes. Each file system has its advantages and limitations. For example, the FAT12 (bit File
Allocation Table) file system used for floppy disks is ideal use with media with small storage capacities (a floppy disk can hold approximately 1.2 MB of data. However, it limits the disk to a maximum of 512 entries in the file table, which means a maximum of 512 files and folders (even if each file is only 1 byte Two of the most common file systems are the FAT (bit File Allocation Table) and NTFS New Technology File System) systems used by later versions of Windows. FAT is an older file system with a disk size limitation of 32 GB. FAT also limits the size of any single file to a maximum of 4 GB. NTFS allows for disk (or volume) sizes of up to 2 terabytes (TB, with an unlimited number of files and folders. It also eliminates the 4 GB file size restriction. Table 6.1 below) compares the characteristics of FAT and NTFS.

Download 2.34 Mb.

Share with your friends:
1   ...   54   55   56   57   58   59   60   61   ...   66




The database is protected by copyright ©ininet.org 2024
send message

    Main page