FILE SYSTEM IN WINDOWS
What are File Systems?
- file system is a method and data structure that the operating system uses to control how data is stored and retrieved.
- It is a structured representation of data and a set of metadata describing the data.
- It would be impossible for a file with the same name to exist and also impossible to remove installed programs and recover specific files without file management, as well as files would have no organization without a file structure.
- The file system enables one to view a file in the current directory as files are often managed in a hierarchy.
Different File Systems in Windows:
- Microsoft Windows employs two major file systems:
- NTFS, the primary format most modern versions of this OS use by default.
- FAT, which was inherited from old DOS and has exFAT as its later extension.
- ReFS was also introduced by Microsoft as a new generation format for server computers starting from Windows Server 2012.
- HPFS developed by Microsoft together with IBM can be found only on extremely old machines running Windows NT up to 3.5.
FAT:
Implementation of FAT:
- FAT (File Allocation Table) is one of the simplest FS types, which has been around since the 1980s.
- It consists of the FS descriptor sector (boot sector or superblock), the block allocation table (referred to as the File Allocation Table) and plain storage space for storing data.
- Files in FAT are stored in directories. Each directory is an array of 32-byte records, each defining a file or its extended attributes (e.g. a long name). A record attributes the first block of a file. Any next block can be found through the block allocation table by using it as a linked list.
- The block allocation table contains an array of block descriptors. A zero value indicates that the block is not used, and a non-zero one relates to the next block of a file or a special value for its end.
Different Versions of FAT:
- The numbers in FAT12, FAT16, FAT32 stand for the number of bits used to address an FS block. This means that FAT12 can use up to 4096 different block references, while FAT16 and FAT32 can use up to 65536 and 4294967296 accordingly. The actual maximum count of blocks is even less and depends on the implementation of the FS driver.
How and Where is FAT Used?
- FAT12 and FAT16 used to be applied to old floppy disks and do not find extensive employment nowadays.
- FAT32 is still widely used for memory cards and USB sticks. The format is supported by smartphones, digital cameras and other portable devices.
- FAT32 can be used on Windows-compatible external storages or disk partitions with the size under 32 GB when they are formatted with the built-in tool of this OS, or up to 2 TB when other means are employed to format the storage.
- FAT is generally only used for devices with small capacity where portability between operating systems is paramount. When choosing a file system for a hard disk, FAT is not recommend unless you are using an older version of Windows.
- FAT partitions need to be defragmented often to maintain reasonable performance.
exFAT:
- FAT file system's major drawback was that it doesn't allow creating files the size of which exceeds 4 GB. To address this issue, exFAT was introduced.
- The exFAT file system was introduced in 2006 and was added to older versions of Windows with updates to Windows XP and Windows Vista.
- exFAT is optimized for flash drives - designed to be a lightweight file system like FAT32, but without the extra features and overhead of NTFS and without the limitations of FAT32.
HPFS:
- HPFS (High Performance File System) was created by Microsoft in cooperation with IBM and introduced with OS/2 1.20 in 1989 as a file system for servers that could provide much better performance when compared to FAT.
- In contrast to FAT, which simply allocates any first free cluster on the disk for the file fragment, HPFS seeks to arrange the file in contiguous blocks, or at least ensure that its fragments (referred to as extents) are placed maximally close to each other.
- At the beginning of HPFS, there are three control blocks occupying 18 sectors: the boot block, the super block and the spare block. The remaining storage space is divided into parts of contiguous sectors referred to as bands taking 8 MB each.
- A band has its own sector allocation bitmap showing which sectors in it are occupied (1 – taken, 0 – free). Each file and directory has its own F-Node located close to it on the disk – this structure contains the information about the location of a file and its extended attributes.
- A special directory band located in the center of the disk is used for storing directories, while the directory structure itself is a balanced tree with alphabetical entries.
NTFS:
Introduction:
- NTFS (New Technology File System) was introduced in 1993 with Windows NT and is currently the most common file system for end user computers based on Windows. Most operating systems of the Windows Server line use this format as well.
- This FS type is quite reliable thanks to journaling and supports many features, including access control, encryption, etc. Each file in NTFS is stored as a descriptor in the Master File Table and its data content.
What is journaling in NTFS?
- Journaling enables a A file system that contains its own recovery capability in the event of a failure.
- In a journaling file system, the information about the changes is recorded in a separate log (the journal) before the indexes to the files are updated.
- If a power or other system failure corrupts the indexes as they are being rewritten, the operating system can use the log to repair them when the computer is restarted.
Implementation of NTFS:
- The Master file table contains entries with all information about them: size, allocation, name, etc. The first 16 entries of the table are retained for the BitMap, which keeps record of all free and used clusters, the Log used for journaling records and the BadClus containing information about bad clusters.
- The first and the last sectors of the file system contain its settings (the boot record or the superblock). This format uses 48 and 64 bit values to reference files, thus being able to support data storages with extremely high capacity.
Benefits of NTFS over similar file systems such as FAT, HPFS are:
- Performance: NTFS allows file compression so your organization can enjoy increased storage space on a disk.
- Security access control: NTFS will enable you to place permissions on files and folders so you can restrict access to mission-critical data.
- Reliability: NTFS focuses on the consistency of the file system so that in the event of a disaster (such as a power loss or system failure), you can quickly restore your data.
- Disk space utilization: In addition to file compression, NTFS also allows disk quotas. This feature enables businesses to have even more control over storage space.
- File system journaling: This means that you can easily keep a log of—and audit—the files added, modified, or deleted on a drive. This log is called the Master File Table (MFT).
How is NTFS used?
- NTFS is used by removable storage devices.
- It is also used to format USBs, HDDs, micro SD cards, and SSD’s. NTFS also supports large and voluminous storage solutions like self-recovering disks.
- When an HDD or SSD is initialized or formatted, it is divided into partitions.
- Partitions are the main divisions of the hard drive’s physical space. Within each partition, the OS tracks the record of all the files it stores.
- The files are stored on the HDD in one or more disk spaces or clusters of a uniform size. The cluster size is determined by NTFS, which can range from 512 bytes to 64 KB.
ReFS:
- ReFS (Resilient File System) is the latest development of Microsoft introduced with Windows 8 and now available for Windows 10.
- Its architecture absolutely differs from other Windows formats and is mainly organized in a form of the B+-tree.
Features:
ReFS is designed to maximize data availability, scale efficiently to large data sets across diverse workloads, and provide data integrity with resiliency to corruption. It seeks to address an expanding set of storage scenarios and establish a foundation for future innovations.
Resilency
ReFS introduces new features that can precisely detect corruptions and also fix those corruptions while remaining online, helping provide increased integrity and availability for your data:
- Integrity-streams - ReFS uses checksums for metadata and optionally for file data, giving ReFS the ability to reliably detect corruptions.
- Storage Spaces integration - when used with a mirror or parity space, ReFS can automatically repair detected corruptions using the alternate copy of the data provided by Storage Spaces. Repair processes are both localized to the area of corruption and performed online, requiring no volume downtime.
- Salvaging data - if a volume becomes corrupted and an alternate copy of the corrupted data doesn't exist, ReFS removes the corrupt data from the namespace. ReFS keeps the volume online while it handles most non-correctable corruptions, but there are rare cases that require ReFS to take the volume offline.
- Proactive error correction - in addition to validating data before reads and writes, ReFS introduces a data integrity scanner, known as a scrubber. This scrubber periodically scans the volume, identifying latent corruptions and proactively triggering a repair of corrupt data.
AUTHORS:
09 Ved Raut
60 Shitij Thakur
77 Rishikesh Wani
81 Yash Nigade
Comments
Post a Comment