representation and a set of metadata describing the stored data. A file system serves for the purposes of the whole storage and it is also a part of an isolated storage segment a disk partition. FILE SYSTEMS
File system blocks are groups of sectors
that optimize storage addressing. Modern file systems generally use block sizes from 1 to 128 sectors (512-65536 bytes). Files are usually stored at the start of a block and take entire blocks. Windows file systems FAT:
FAT (File Allocation Table) is one of the simplest types of file
systems. It consists of a file system descriptor sector (boot sector or superblock), a file system block allocation table (referred as File Allocation Table) and plain storage space to store files and folders.
Files on FAT are stored in directories. Each directory is an array of
32-byte records, each defining file or file extended attributes (e.g. a long file name). File record attributes the first block of a file.
Any next block can be found through a block allocation table by
using it as a linked list. FAT The numbers in FAT12, FAT16, FAT32 stand for the number of bits used to enumerate a file system 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 a file system driver. FAT FAT12 was used for old floppy disks. FAT16 (or simply FAT) and FAT32 are widely used for flash memory cards and USB flash sticks. The system is supported by mobile phones, digital cameras and other portable devices.
FAT or FAT32 is a file system that is used on Windows-
compatible external storages or disk partitions with the size under 2GB (for FAT) or 32GB (for FAT32). Windows cannot create FAT32 file system over 32GB (however Linux supports FAT32 up to 2TB). NTFS
NTFS (New Technology File System) was introduced in
Windows NT and currently it is a major file system for Windows. This is the default file system for disk partitions and the only file system that supports disk partitions over 32GB.
The file system is quite extensible and supports many
file properties, including access control, encryption etc. Each file on NTFS is stored as a file descriptor in a Master File Table and file content. NTFS
A Master file table contains all information
about the file: size, allocation, name etc. The first and the last sectors of the file system contain file system settings (boot record or superblock). This file system uses 48 and 64 bit values to reference files, thus, supporting disk storages with high capacity. ReFS ReFS (Resilient File System) is the latest development of Microsoft currently available for Windows 8 Servers. The file system architecture absolutely differs from other Windows file systems and is mainly organized in a form of a B+-tree.
ReFS has high tolerance to failures due to new
features included into the system. And, namely, Copy-on-Write (CoW): no metadata is modified without being copied; data is not written over the existing data, but into new disk space. With any file modifications, a new copy of metadata is stored into free storage space, and then the system creates a link from older metadata to the newer one. Thus, the system stores significant quantity of older backups in different places providing easy file recovery unless this storage space is overwritten. FILE DIRECTORIES
Collection of files is a file directory. The
directory contains information about the files, including attributes, location and ownership. Much of this information, especially that is concerned with storage, is managed by the operating system. The directory is itself a file, accessible by various file management routines. Information contained in a device directory are: Name Type Address Current length Maximum length Date last accessed Date last updated Owner id Protection information Operation performed on directory are: Search for a file Create a file Delete a file List a directory Rename a file Traverse the file system SINGLE-LEVEL DIRECTORY In this a single directory is maintained for all the users. Naming problem: Users cannot have same name for two files. Grouping problem: Users cannot group files according to their need. TWO LEVEL DIRECTORY In this separate directories for each user is maintained. Path name:Due to two levels there is a path name for every file to locate that file. Now,we can have same file name for different user. Searching is efficient in this method. TREE-STRUCTURED DIRECTORY Directory is maintained in the form of a tree. Searching is efficient and also there is grouping capability. We have absolute or relative path name for a file. FILE ALLOCATION METHODS Continous allocation A single continuous set of blocks is allocated to a file at the time of file creation. Thus, this is a pre-allocation strategy, using variable size portions.
The file allocation table needs just a single entry for each file, showing the starting block and the length of the file.
This method is best from the point of view of the individual
sequential file. Multiple blocks can be read in at a time to improve I/O performance for sequential processing. It is also easy to retrieve a single block. For example, if a file starts at block b, and the ith block of the file is wanted, its location on secondary storage is simply b+i- 1. INDEXED ALLOCATION It addresses many of the problems of contiguous and chained allocation. In this case, the file allocation table contains a separate one- level index for each file: The index has one entry for each block allocated to the file.
Allocation may be on the basis of fixed-size
blocks or variable-sized blocks. Allocation by blocks eliminates external fragmentation, whereas allocation by variable-size blocks improves locality.