100% found this document useful (1 vote)
266 views

Q1 To Describe FAT, Boot Sector, Directory Area, Data Area

The document discusses various file allocation table (FAT) systems and file systems. It describes the basic components of a FAT volume including the boot sector, file allocation table area, root directory area, and data area. It then provides details on different FAT types (FAT12, FAT16, FAT32) and how they determine the maximum volume and file sizes supported. The document also summarizes key features of common file systems like FAT16, FAT32, NTFS, HPFS, and Linux file systems.

Uploaded by

Anandhu c
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
266 views

Q1 To Describe FAT, Boot Sector, Directory Area, Data Area

The document discusses various file allocation table (FAT) systems and file systems. It describes the basic components of a FAT volume including the boot sector, file allocation table area, root directory area, and data area. It then provides details on different FAT types (FAT12, FAT16, FAT32) and how they determine the maximum volume and file sizes supported. The document also summarizes key features of common file systems like FAT16, FAT32, NTFS, HPFS, and Linux file systems.

Uploaded by

Anandhu c
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 17

Q1 To describe FAT, boot sector, directory area, data area.

FAT
 Initially designed in 1977 for use on floppy disks
 Later used on PC operating systems such as MS-DOS and early versions of Microsoft
Windows.

 FAT is an acronym for File Allocation Table.

 disk is divided into clusters, the unit used by the file allocation, and
 FAT describes which clusters are used by which files.

 FAT provides the index of the files in the system and is statically allocated at the time
File Allocation of formatting the drive.

 It contains an entry for each cluster (a data storage area).

 The FAT's entries contain either the number of the next cluster in the file, or a marker
indicating EOF (end of file), unused disk space, or other areas of the drive that are
specially reserved.

 File allocation table is a table for describing the allocation status of the clusters

FAT file system volume is composed of four basic regions,

, which are boot sector, file allocation table area, root directory area and data area.
Boot sector: It is also called reserved sector, and located in the first part. It includes: the boot

loader code needed by the operating system to start computer, the partition table of the main

boot record (MBR) which describes how the drive is organized, and the BIOS parameter block

(BPB) which describes the physical outline of the data storage volume.

For FAT32 file systems, the reserved sectors include a File System Information Sector at logical

sector 1 and a Backup Boot Sector at logical sector 6.

FAT area: This section usually contains two copies of the file allocation table for redundancy

checking and specifying how to allocate clusters.


.
These are maps of the Data Region, indicating which clusters are used by files and directories.

Root directory area: This area is a directory table containing information about directories and

files. It only works with FAT12 and FAT16. It has a fixed maximum size and is configured at

creation time.

FAT32 usually stores the root directory in the data area, so it can be extended as needed.

Data area: This is where directory data and existing files are stored. It occupies most of the

partitions on the disk.

Types of File Allocation Table

The general types of file system (FAT12, FAT16 or FAT32) are determined by the width of the

cluster entries in the FAT.


FAT Boot Sector ( More Explanation )

 First sector of a FAT system is the boot sector / reserved sector/ the zeroeth sector

 Contains most of the information with which to determinethe file system type, and size
and location of data structures
 Boot sector format is different for FAT12/16 and FAT32

 It includes:
the boot loader code needed by the operating system to start computer, the partition
table of the main boot record (MBR) which describes how the drive is organized,

and the BIOS parameter block (BPB) which describes the physical outline of the data
storage volume

Because the MBR transfers CPU execution to the boot sector, the first few bytes of the FAT
boot sector must be valid executable instructions for an x86 CPU.
From offset 0 to offset 32 of the boot record, there are common parameters of FAT16 and
FAT32.  Because parameters after offset 32 are different each other, two file systems are not
compatible. 

Parameters for FAT16 file system.

 Jump boot code: The instruction that makes jump to the jump code. 
 OEM name:  Just string stands for OEM company.  Any string can be here.
 Bytes per sector: This value is how many bytes does one sector has.  The following
values are only available - 512, 1024, 2048 and 4096.  Usually, this field has 512 as its
value.
 Sector per cluster:  The number of sector each cluster has.  This value must be greater
than zero and be a multiple of two.
 Reserved sector count: This field has the number of the reserved sector.  The size of the
reserved area occupies one sector at least because the boot record is located at the first
sector of the reserved area.  So, this field have not to be zero.  In FAT16, this field
usually has one as its value compared to the field of FAT32 has 32. 

 Number of FATs: This field has the number of FATs in a given volume.  This value
must be greater then one and 2 is recommended. 
 Root directory entry count: (Only for FAT16) This field tells that how many entries
(files and directories are the "entries") can reside in the root directory.  This value is
always an even number of the value of "Bytes per sector."  For example, if the value of
the bytes per sector is 512, this field can have values like 512, 1024, 2048, and so on. 
.  But, in case of FAT32, this field must be zero.
 Total sector 16: This value reflects total sectors of given volume.  It is important that this
value is NOT total sectors of the storage device BUT total sectors of the volume.  If this
field has a zero as its value, the "Total sector 32" field is not able to be zero. 
 Media: This field indicates that this volume resides in what kinds of media device.  FAT
size 16: This field has the sector number of the FAT area.  This value is not of the sum
total of FAT #1 and FAT #2 area, but of the one FAT area (FAT #1 or FAT #2, because
two area are same exactly).  Only FAT12 and FAT16 uses this value and this value must
be a zero for FAT32 file system.
 Sector per track:  This item is for a kind of interrupt of x86 families - 0x13 interrupt. 
But this field is not used by windows now.
 Number of heads: This item is for a kind of interrupt of x86 families - 0x13 interrupt. 
But this field is not used by windows now.
 Hidden sector: This item is for a kind of interrupt of x86 families - 0x13 interrupt.  This
field stores the number of sector before the given volume.  In volume that is not
partitioned, this field must be a zero.  But this field is not used by windows now.
 Total sector 32: This value reflects total sectors of given volume

Q2. Explain various file systems - FAT16, FAT32, New Technology File
System(NTFS), High Performance File System(HPFS), Linux file system .

FAT16 (16-bit File Allocation Table)

 The second implementation of FAT was FAT16, which introduced the 16-bit file

allocation table entry for the first time in 1984.

 Depending on the operating system and cluster size used, the FAT16 formatted drive

can have a maximum drive size of 2 GB to 16 GB, the latter one which is only available in

Windows NT 4 with a 256 KB cluster.


 The FAT system is a 16-bit system that allows files to be identified by a name consisting
of up to 8 characters and a 3 character extension, which is why this system is called
FAT16.
 The FAT file system is a 16-bit system, which means that cluster addresses can not be
bigger than 16 bits. The maximum number of clusters that can be referenced is
therefore 2 16, (65536) clusters.
 Now, since a cluster consists of a fixed number (4,8,16,32, ...) of sectors of 512
contiguous bytes, the maximum size of FAT partition can be determined by multiplying
the number of clusters by the size of a cluster.
 With 32Kb clusters, the maximum size of a FAT partition is therefore 2GB.
FAT32 (32-bit File Allocation Table)

 In order to overcome the volume size limit of FAT16, Microsoft designed a new version
of the file system FAT32 in 1996, which supported an increased number of possible
clusters , much larger volumes, better performance and more flexibility and robustness

 The FAT32 boot sector uses a 32-bit field for the sector count, limiting the maximum
FAT32 volume size to 2 TB with a sector size of 512 bytes. The maximum FAT32 volume
size is 16 TB with a sector size of 4KB

 FAT32 uses 32-bit for the FAT entries. In fact, only 28 bits are used, as 4 bits are
reserved for future use

 IN FAT32 file system, the maximum number of clusters per partition went increased

from 65535 to 268,435,455 (2 28-1).

 FAT32 thus allows Maximum partition size up to 8 TB

 FAT 32 not in support of partitions less than 512MB.

 The maximum possible size for a file is 4 GB.

Features
 FAT32 uses space more efficiently. FAT32 uses smaller clusters (that is, 4-KB clusters for
drives up to 8 GB in size), resulting in 10 to 15 percent more efficient use of disk space
relative to large FAT or FAT16 drives.

 FAT32 is more robust. FAT32 can relocate the root folder and use the backup copy of
the file allocation table instead of the default copy. In addition, the boot record on
FAT32 drives is expanded to include a backup copy of critical data structures. Therefore,
FAT32 drives are less susceptible to a single point of failure than existing FAT16 drives.

 FAT32 is more flexible. The root folder on a FAT32 drive is an ordinary cluster chain, so
it can be located anywhere on the drive.

 The root directory in FAT16 system is fixed size; that is when the medium is
formatted, the maximum number of files that could be created in the root directory is
set , typically 512 B
 In FAT32, the root directory is dynamically resizable, like all other directories.

 Also in FAT 32 Two special sectors added to the volume: the FS info sector and the
backup boot sector.

Comparison (16 and 32 needed)

NTFS File System


 NTFS is short for New Technology File System, created by Microsoft and
introduced in 1993 with Windows NT 3.1.
 Windows NT and Windows 2000 are the primary operating systems using
the NTFS file system.

 FAT16 and FAT32 have drawbacks: they have weak error recovery and no
built-in file security.

 NTFS more secure and robust than FAT16 or FAT32, and offers better
recovery from errors

 NTFS: Support for transferring big files with no limit. The most ideal file
system for hard drive and external hard drives.

 FAT32: Support for transferring a single file within 4GB. Used as the file
system for SD card, U SB flash drive.

 NTFS contains more advanced features than FAT, like security, reliability.

 it has good utilization ratio of disk space.

 also provides  access control list (ACL) and file system journaling.

 NTFS supports big file storage on high capacity storage devices like an
internal or external hard drive.

 While for SD card, USB flash drive, FAT32 will be the best

NTFS Structure
 NTFS Boot Sector – This portion contains the BIOS

parameter block used to store information of volume

layout and the file system structures, including the boot

code that loads Windows Server 2003.

 Master File Table – This portion contains the essential

information to retrieve files from the NTFS partition like

file attributes etc.

 File System Data – This portion stores data that is not

contained within the Master File Table.

 Master File Table Copy – This portion contains copies of

the recovery related key records .In the event when there

is a problem with the original copy, for recovery this

portion is required.
NTFS advantages:
 Filenames are saved in NTFS using UNICODE.
 On the NTFS configured volume, the files could be accessed easily

and their names are also displayed correctly regardless of the

system default encoding.

 An incorporated security system is there in NTFS having control of

files sharing among the users.

 Privacy is guaranteed by various permissions levels, groups and

owners.

 Files and folders could be encrypted or decrypted in NTFS while

writing or reading them.

 Individual folders or files could be compressed or decompressed

easily.

 NTFS can also complete the failed operation by restoring its state.

 NTFS has ability to deal large partitions and files successfully

Features
 Naming : File name can be as long as 255 characters ,
File names can have any character other than /\ “ \:*

They are not case sensitive

 It provides folder and file security. This is done by passing on NTFS permission to files
and folders. Security works at local as well as network level. Every file and folder in the list has
an Access Control List that includes the users, security identifier, and the access privileges that
are granted to the users.

 Files and partition sizes are larger in NTFS than those of FAT. An NTFS partition can be of
a size as large as 16 Exabytes, but practically it is limited to 2TB. File size can range from 4GB to
64 GB.
 It provides up to 50% file compression

 It is a reliable and recoverable file system which makes use of transaction logs for
updating files and folders automatically.

 No realistic file size or partition size limit

 Uses a change journal to help restore information quickly if power failure or other
system problems occur

 It provides bad-cluster mapping. This means that it can detect bad clusters or erroneous
space in the disk, retrieve the data in those clusters, and then store it in another space. To
avoid further data storage in those areas, bad clusters are marked for errors.

 Limitations : No realistic file-size or partition size limits.


Not compatible with very old operating system

HPFS (High Performance File System)

 HPFS is the file system introduced with IBM's OS/2 Version 1.2.


 HPFS handling large files up to 2 gigabytes across multiple hard disk
volumes long file names up to 256 bytes.
 . HPFS was designed to improve on the drawbacks of FAT
 HPFS avoided several MS DOS limitations, especially the eight-
character computer file name restriction.
 The program runs on the same machine as the MS-DOS file system
and file allocation table, or may run independently.

FEATURES

 It locates file directory and allocation information in close physical


proximity to the files themselves on the hard disk. (The FAT file system
locates the root directory and allocation information on the outermost
cylinders of the drive.)
 It has a more robust and efficient file system tree structure than FAT, so
you can locate directories more quickly.
 It has multiple asynchronous read/write threads.
 It uses sector-based allocation instead of the more space-wasting,
cluster-based allocation used by FAT.
 It uses large file cache sizes and lazy-writes.
Advantages

 Contiguous storage of extended attributes


 Resistance to file fragmentation
 Small cluster size
 Support for larger file storage devices (up to 512 GB)
 Speedier disk operation

Drawbacks:

 Requires more system memory


 HPFS partitions are not visible to MS-DOS, so if need to boot from a
floppy disk, it could be inconvenient.
 Native DOS needs a special utility (Partition Magic from PowerQuest)
to access a HPFS partition

Structure of an HPFS volume

 Sectors 0-15 of a volume (8Kb) are the boot block and contain a
volume name, 32-bit volume ID, and a disk bootstrap program

 Sectors 16 and 17 are known as the Super Block and the Spare
Block respectively.
 Super Block contains
1. pointers to the free space bitmaps bad block list ,
2. pointers to the directory block band and
3. pointers to root directory.
4. also contains the date that the volume was last checked out
and repaired with CHKDSK /F.
 The Spare Block contains various flags and pointers that will be
discussed later it is modified although infrequently as the system
executes.
 The remainder of the disk is divided into 8Mb bands. Each band has
its own free space bitmap in which a bit represents each sector. A bit
is 0 if the sector is in use and 1 if the sector is available. The bitmaps
are located at the head or tail of a band so that two bitmaps are
adjacent between alternate bands.

Linux file system


 Linux file system is a logical method of organizing and storing large
amounts of information in a way that makes it easy to manage. A file is a
smallest unit in which the information is stored.

Features.
 All data in is organized into files.
 All files are organized into directories. These directories are organized into a
tree-like structure called the file system.

All files on a Linux system are stored on file systems which are

organized into a single inverted tree of directories, know as a file

system hierarchy.In the inverted tree, root lies at the top and the

branches of directories and sub-directories stretch below the root.

The file system hierarchy


All files on a Linux system are stored on file systems organized into a
single inverted tree of directories, known as a file system hierarchy.
 In inverted tree, root lies at the top and the branches of directories
and sub-directories stretch below the root.

Figure: Significant file system directories

Here, the directories ‘/’ is the root directory which lies at the top of file system
hierarchy. The ‘/’ character is also used as a directory separator in the file name,
for example ‘/etc’ is a sub-directory of ‘/’ directory.

Important directories
Location Purpose
/usr Installed software, shared libraries, include files, and static read-
only program data. Important subdirectories include:-

* /usr/bin: User commands.


* /usr/sbin: System administration commands.

* /usr/local: Locally customized software.

/etc Configuration files specific to this system.


Files that dynamically change (e.g. databases, cache directories,
log files, printer spooled documents, and website content) may be
/var found under /var.
Run-time data for processes started since the last boot. This
includes process ID files and lock files, among other things. The
/run contents of this directory are recreated on reboot.
Home directories where regular users store their personal data and
/home configuration files.
/root Home directory for the administrative superuser, root.
A world-writable space for temporary files. Files more than 10
days are automatically be deleted from that directory. Another
temporary directory exists at /var/tmp, in which files that have not
been accessed,changed, or modified in more than 30 days are
/tmp deleted automatically.
/boot Files needed in order to start the boot process.
Contains special device files which are used by the system to
/dev access hardware.

You might also like