8. High Level Formatting (File System)

High level formatting prepares drive partitions for the operating system by creating a root directory. From this all other subdirectories can be created, and creating a FAT (File Allocation Table), which keeps track of all data on the disks and all the relationships between different pieces of information. A loss of the FAT translates into data loss, since the system will not be able to attribute data to specific files even if the data itself is complete. [4,18]

FAT16

This is limited to volume sizes of just 2GB, only approximately 65000 files on one volume, a maximum file size of just 2GB and only the 8.3 file names. There is no backup of the MBR should that point fail. It is efficient, in terms of both speed and storage on volumes that are smaller than 256 MB. [10,11]

FAT32

This is limited to volume sizes of 2TB, almost unlimited files per volume, a maximum file size of only 4GB, and can support file names up to length 255. [11]

NTFS

This is limited to volume sizes of 2TB, almost unlimited files per volume, a maximum file size limited only by volume size, and can support file names up to length 255. [11]

MAC OS File System

File System Specification Record

The file system specification record for files and directories is defined by the FSSpec data type. See below.

TYPE FSSpec =

RECORD
vRefNum: Integer;
parID: LongInt;
name: Str63;
END;

vRefNum

parID

name

{file system spec}


{volume reference number}
{directory ID of parent directory}
{filename or directory name}

{The volume reff no. of the volume containing the specified file/directory.}

{The directory ID of the directory containing the specified file or directory.}

{The name of the specified file or directory.} [12]

EXT2

The EXT2 file system, like many other file systems, is built on the assumption that the data held in files is kept in data blocks. These data blocks are all of the same size and, although that size can vary between different EXT2 file systems the block size of a particular EXT2 file system is set when it is made. Every file's size is rounded up to a whole number of blocks. If the block size is 1024 bytes, then a file of 1025 bytes will occupy two 1024 byte blocks. This does unfortunately means that an average half a block per file is wasted space. Usually in computing a trade off between CPU usage for memory and disk space utilisation is made. In this case Linux, along with most operating systems, trades off a relatively inefficient disk usage to reduce the strain on the CPU. Not all of the blocks in the file system hold data, it is essential that some are used to store the information that describes the structure of the file system. "EXT2 defines the file system topology by describing each file in the system with an inode data structure". An inode describes which blocks the data within a file occupies. It also has the access rights of the file, the modification date and time and the type of the file. Every file in the EXT2 file system is described by an inode, each inode has a number to identify it. The inodes for the file system are all stored in inode tables. EXT2 directories are merely particular files which are again described by inodes, that contain pointers to the inodes of their directory entries.

EXT2

The figure shows the layout of the EXT2 file system as occupying a series of blocks in a block structured device. As far as each file system is concerned, block devices are simply a series of blocks which can be both read and written. A file system does not need to worry itself with where on the physical cylinder a block should be placed, that is a function of the device's driver. Whenever a file system needs to read data from the block device containing it, it requests that the device driver reads the integral number of blocks. The EXT2 file system seperates the logical partition that it occupies into Block Groups. Each group duplicates information critical to the integrity of the file system, in additon to occupying real files and directories as blocks of information and data. This duplication is neccessary should a problem occur and the file system require recovering.[9]

XFS

On May 1 2001, SGI made available Release 1.0 of its journaling XFS file system for Linux. XFS, is renowned by its support for large disk farm and very high I/O throughput, tested up to 7GB/sec. XFS was developed for the IRIX 5.3 SGI Unix operating system, its original version was introduced in December 1994. The objective of the file system was to support exceptionally large files and high throughput for real time video recording and playing.[8]

"XFS uses an extent based space allocation, and it has features like delayed allocation, space pre- allocation and space coalescing on deletion, and goes to great lengths in attempting to layout files using the largest extents possible. To make the management of large amounts of contiguous space in a file efficient, XFS uses very large extent descriptors in the file extent map. Each descriptor can describe up to two million file system blocks. Describing large numbers of blocks with a single extent descriptor eliminates the CPU overhead of scanning entries in the extent map to determine whether blocks in the file are contiguous, it can simply read the length of the extent rather than looking at each entry to see if it is contiguous with the previous entry."[8]

"XFS allows variable sized blocks, from 512 bytes to 64 kilobytes on a per file system basis. Changing the file system block size can vary fragmentation. File systems with large numbers of small files typically use smaller block sizes in order to avoid wasting space via internal fragmentation. File systems with large files tend to make the opposite choice and use large block sizes in order to reduce external fragmentation of the file system and their files' extents."[8] See figure below.

XFS

Index Back Forward

Gregg Williams, 294805, CS_134 Web Report