SlideShare una empresa de Scribd logo
1 de 25
File System &
File allocation table(FAT)
PREPARED BY:
DAVE SUSHILKUMAR A.
PABARI SHASHIKANT C.
PAMBHAR VISHAL G.
File System
The collection of algorithms and data structures
which perform the translation from logical file
operations (system calls) to actual physical
storage of information.
2
What Does a File System Do?
 Responsibilities
 Creating, manipulating, renaming, copying, and removing
files to and from a storage device
 Organizing files into common storage units
 Called directories
 Keeping track of file and directory locations
 Assisting users
 Relate files and folders to the physical structure of the
storage medium
3
 Files used by operating systems and applications
 Word-processing documents
 Source code for programs you have written
 Music files
 Movie files
 Spreadsheets
 Photos
 Operating systems use a file folder icon to represent a
directory
4
Layered File System
 Logical File System
 Maintains file structure via FCB
(file control block)
 File organization module
 Translates logical block to
physical block
 Basic File system
 Converts physical block to disk
parameters (drive 1, cylinder 73,
track 2, sector 10 etc)
 I/O Control
 Transfers data between memory
and disk
5
Physical Disk Structure
 Parameters to read from disk:
 cylinder(=track) #
 platter(=surface) #
 sector #
 transfer size
Tracks
Sectors
within a
Track
Cluster
6
File system Units
 Sector – the smallest unit that can be accessed on
a disk (typically 512 bytes)
 Block(or Cluster) – the smallest unit that can be
allocated to construct a file
 What’s the actual size of 1 byte file on disk?
 takes at least one cluster,
 which may consist of 1~8 sectors,
 thus 1byte file may require ~4KB disk space.
7
Sector~Cluster~File layout 8
FCB – File Control Block
 Contains file attributes + block locations
 Permissions
 Dates (create, access, write)
 Owner, group, ACL (Access Control List)
 File size
 Location of file contents
 UNIX File System  I-node
 FAT/FAT32  part of FAT (File Alloc. Table)
 NTFS  part of MFT (Master File Table)
9
File System Implementation
 Contiguous allocation
 Linked list allocation
 Linked list allocation using an index (DOS file allocation table - FAT)
10
Contiguous Allocation
 The file is stored as a contiguous block of data
allocated at file creation
(a) Contiguous allocation of disk space for 7 files
(b) State of the disk after files D and E have been removed
11
Contiguous Allocation (Cont.)
 FAT (file allocation table) contains file name, start block, length
 Advantages
 Simple to implement (start block & length is enough to define a file)
 Fast access as blocks follow each other
 Disadvantages
 Fragmentation
 Re-allocation (compaction)
12
Linked List Allocation
 The file is stored as a linked list of blocks
13
Linked List Allocation (Cont.)
 Each block contains a pointer to the next block
 FAT (file allocation table) contains file name, first block address
 Advantages
 Fragmentation is eliminated
 Block size is not a power of 2 because of pointer space
 Disadvantages
 Random access is very slow as links have to be followed
14
Indexed Block Allocation
 Indexed allocation
 Each file has its own index block(s) of pointers to its data blocks
 Logical view
index table
15
Indexed Allocation (Cont.)
 Need index table
 Random access
 Dynamic access without external fragmentation, but have overhead of
index block
 Mapping from logical to physical in a file of maximum size of 256K
bytes and block size of 512 bytes. We need only 1 block for index
table
Q = displacement into index table
R = displacement into block
LA/512
Q
R
16
Indexed Allocation – Mapping (Cont.)
 Mapping from logical to physical in a file of unbounded length
(block size of 512 words)
 Linked scheme – Link blocks of index table (no limit on size)
LA / (512 x 511)
Q1
R1
Q1 = block of index table
R1 is used as follows:
R1 / 512
Q2
R2
Q2 = displacement into block of index table
R2 displacement into block of file:
17
Indexed Allocation – Mapping (Cont.)
 Two-level index (4K blocks could store 1,024 four-byte pointers in outer
index -> 1,048,567 data blocks and file size of up to 4GB)
LA / (512 x 512)
Q1
R1
Q1 = displacement into outer-index
R1 is used as follows:
R1 / 512
Q2
R2
Q2 = displacement into block of index table
R2 displacement into block of file:
18
File Allocation Table
FAT File System
• The File Allocation Table (FAT) file system is a simple file system originally designed for
small disks and simple folder structures.
• The FAT file system is named for its method of organization, the file allocation table,
which resides at the beginning of the volume.
• To protect the volume, two copies of the table are kept, in case one becomes damaged. In
addition, the file allocation tables and the root folder must be stored in a fixed location so
that the files needed to start the system can be correctly located.
• A volume formatted with the FAT file system is allocated into clusters.
• The default cluster size is determined by the size of the volume.
• For the FAT file system, the cluster number must fit in 16 bits and be a power of 2.
FAT File System
19
• The way FAT works is that it keeps a record at the start of the drive of all
the files, and to point to the files, it points to the clusters that contain the
files.
• The main rule of clusters is that there cannot be more than 1 file per
cluster; otherwise, pointing to that cluster would cause problems, as it
would be pointing and doing read/write operations on two files at once,
which would cause Windows to crash.
• Depending on the size and FAT version of the partition, the cluster size
can vary.
• Also keep in mind that a section of the partition is reserved for the FAT,
which is the record of each file and where it can be found. This changes
in size depending on the size of the partition and clusters.
How FAT Works
The FAT Family
 FAT12, FAT16, FAT32
 12, 16, and 32 are the number of bits
used in the FAT for cluster addresses
20
 FAT32 is a derivative of the File Allocation Table (FAT)
file system that supports drives with over 2GB of storage.
Because FAT32 drives can contain more than 65,526
clusters, smaller clusters are used than on large FAT16
drives. This method results in more efficient space
allocation on the FAT32 drive.
 The largest possible file for a FAT32 drive is 4GB minus
2 bytes.
 The FAT32 file system includes four bytes per cluster
within the file allocation table. Note that the high 4 bits of
the 32-bit values in the FAT32 file allocation table are
reserved and are not part of the cluster number.
FAT32 File System 21
Creating a FAT File System
 High-level formatting creates file system data structures
 Boot sector
 Cluster allocation
 File Allocation Table (FAT)
 $Bitmap in the Master File Table (MFT) for NTFS
 Exact details depend on operating system
 Root Directory
22
Each FAT type has its limits; this table displays these limits:
FAT type Max Clusters Cluster sizes Max volume size
FAT12 4,086 0.5 to 4KB
16,736,256 bytes
(16MB)
FAT16 65,526 2KB to 32KB
2,147,483,648 bytes
(2GB)
FAT32 268,435,456 4KB to 32KB
8,796,093,022,208 bytes
(8TB)
FAT Limitations 23
Deleted File Recovery
All Cluster Pointers in the FAT are gone!
 Option 1
Grab the next n-1 consecutive clusters.
Call it the file.
May have allocated or unallocated
clusters from other files.
WinHex uses this option.
 Option 2
Grab the next n-1 unallocated clusters
using the FAT.
Call it the file.
May have unallocated clusters from
other deleted files.
EnCase uses this option.
• Get the first cluster from the directory entry
• Get size from directory entry
• Calculate the number of clusters allocated
to the file, n.
24
25

Más contenido relacionado

La actualidad más candente

file system in operating system
file system in operating systemfile system in operating system
file system in operating system
tittuajay
 
Memory management early_systems
Memory management early_systemsMemory management early_systems
Memory management early_systems
Mybej Che
 
Files concepts.53
Files concepts.53Files concepts.53
Files concepts.53
myrajendra
 
01 Computer Forensics Fundamentals - Notes
01 Computer Forensics Fundamentals - Notes01 Computer Forensics Fundamentals - Notes
01 Computer Forensics Fundamentals - Notes
Kranthi
 

La actualidad más candente (20)

file system in operating system
file system in operating systemfile system in operating system
file system in operating system
 
Windows File Systems
Windows File SystemsWindows File Systems
Windows File Systems
 
NTFS file system
NTFS file systemNTFS file system
NTFS file system
 
Memory management early_systems
Memory management early_systemsMemory management early_systems
Memory management early_systems
 
File Management in Operating Systems
File Management in Operating SystemsFile Management in Operating Systems
File Management in Operating Systems
 
File Management in Operating System
File Management in Operating SystemFile Management in Operating System
File Management in Operating System
 
Files concepts.53
Files concepts.53Files concepts.53
Files concepts.53
 
File System Implementation - Part1
File System Implementation - Part1File System Implementation - Part1
File System Implementation - Part1
 
Ntfs and computer forensics
Ntfs and computer forensicsNtfs and computer forensics
Ntfs and computer forensics
 
Chapter 12 - Mass Storage Systems
Chapter 12 - Mass Storage SystemsChapter 12 - Mass Storage Systems
Chapter 12 - Mass Storage Systems
 
File Management
File ManagementFile Management
File Management
 
File system structure
File system structureFile system structure
File system structure
 
File allocation methods (1)
File allocation methods (1)File allocation methods (1)
File allocation methods (1)
 
File concept and access method
File concept and access methodFile concept and access method
File concept and access method
 
Linux file system
Linux file systemLinux file system
Linux file system
 
Backup & restore in windows
Backup & restore in windowsBackup & restore in windows
Backup & restore in windows
 
CS9222 Advanced Operating System
CS9222 Advanced Operating SystemCS9222 Advanced Operating System
CS9222 Advanced Operating System
 
01 Computer Forensics Fundamentals - Notes
01 Computer Forensics Fundamentals - Notes01 Computer Forensics Fundamentals - Notes
01 Computer Forensics Fundamentals - Notes
 
Distributed Operating System_1
Distributed Operating System_1Distributed Operating System_1
Distributed Operating System_1
 
File Allocation Methods.ppt
File Allocation Methods.pptFile Allocation Methods.ppt
File Allocation Methods.ppt
 

Destacado (7)

Linked allocation 48
Linked  allocation 48Linked  allocation 48
Linked allocation 48
 
Index allocation 48 1
Index allocation 48 1Index allocation 48 1
Index allocation 48 1
 
Secondary storage management in os
Secondary storage management in osSecondary storage management in os
Secondary storage management in os
 
Operation System
Operation SystemOperation System
Operation System
 
ITFT_File system interface in Operating System
ITFT_File system interface in Operating SystemITFT_File system interface in Operating System
ITFT_File system interface in Operating System
 
Paging and segmentation
Paging and segmentationPaging and segmentation
Paging and segmentation
 
Os Swapping, Paging, Segmentation and Virtual Memory
Os Swapping, Paging, Segmentation and Virtual MemoryOs Swapping, Paging, Segmentation and Virtual Memory
Os Swapping, Paging, Segmentation and Virtual Memory
 

Similar a File System and File allocation tables

File system, dual boot, addon components, create user
File system, dual boot, addon components, create userFile system, dual boot, addon components, create user
File system, dual boot, addon components, create user
Harman Gahir
 
File System, Dual Boot, Addon Components, Create User
File System, Dual Boot, Addon Components, Create UserFile System, Dual Boot, Addon Components, Create User
File System, Dual Boot, Addon Components, Create User
Harman Gahir
 
Ch12 OS
Ch12 OSCh12 OS
Ch12 OS
C.U
 

Similar a File System and File allocation tables (20)

File Access & File System & File Allocation Table
File Access & File System & File Allocation TableFile Access & File System & File Allocation Table
File Access & File System & File Allocation Table
 
OS_Assignment for Disk Space & File System & File allocation table(FAT)
OS_Assignment for Disk Space & File System & File allocation table(FAT)OS_Assignment for Disk Space & File System & File allocation table(FAT)
OS_Assignment for Disk Space & File System & File allocation table(FAT)
 
Fat File Systems
Fat File SystemsFat File Systems
Fat File Systems
 
File system, dual boot, addon components, create user
File system, dual boot, addon components, create userFile system, dual boot, addon components, create user
File system, dual boot, addon components, create user
 
File System, Dual Boot, Addon Components, Create User
File System, Dual Boot, Addon Components, Create UserFile System, Dual Boot, Addon Components, Create User
File System, Dual Boot, Addon Components, Create User
 
Os
OsOs
Os
 
File System
File SystemFile System
File System
 
File system
File systemFile system
File system
 
File system
File systemFile system
File system
 
OSCh12
OSCh12OSCh12
OSCh12
 
Ch12 OS
Ch12 OSCh12 OS
Ch12 OS
 
OS_Ch12
OS_Ch12OS_Ch12
OS_Ch12
 
Chapter 11 - File System Implementation
Chapter 11 - File System ImplementationChapter 11 - File System Implementation
Chapter 11 - File System Implementation
 
Introduction to filesystems and computer forensics
Introduction to filesystems and computer forensicsIntroduction to filesystems and computer forensics
Introduction to filesystems and computer forensics
 
file management_part2_os_notes.ppt
file management_part2_os_notes.pptfile management_part2_os_notes.ppt
file management_part2_os_notes.ppt
 
Ch11
Ch11Ch11
Ch11
 
Windows 7
Windows 7Windows 7
Windows 7
 
DBMS
DBMSDBMS
DBMS
 
How to convert file system without data loss
How to convert file system without data lossHow to convert file system without data loss
How to convert file system without data loss
 
File system implementation
File system implementationFile system implementation
File system implementation
 

Más de shashikant pabari

Más de shashikant pabari (6)

Remote spy(Real Time Spy)
Remote  spy(Real Time Spy)Remote  spy(Real Time Spy)
Remote spy(Real Time Spy)
 
Basic shortcut keys of computer or PC
Basic shortcut keys of computer or PCBasic shortcut keys of computer or PC
Basic shortcut keys of computer or PC
 
Basic concept of c++
Basic concept of c++Basic concept of c++
Basic concept of c++
 
Imap(internet massege access protocaols)
Imap(internet massege access protocaols)Imap(internet massege access protocaols)
Imap(internet massege access protocaols)
 
Data representation
Data representationData representation
Data representation
 
Newton cotes integration method
Newton cotes integration  methodNewton cotes integration  method
Newton cotes integration method
 

Último

1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
AldoGarca30
 
Integrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - NeometrixIntegrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - Neometrix
Neometrix_Engineering_Pvt_Ltd
 
Standard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power PlayStandard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power Play
Epec Engineered Technologies
 
Hospital management system project report.pdf
Hospital management system project report.pdfHospital management system project report.pdf
Hospital management system project report.pdf
Kamal Acharya
 
"Lesotho Leaps Forward: A Chronicle of Transformative Developments"
"Lesotho Leaps Forward: A Chronicle of Transformative Developments""Lesotho Leaps Forward: A Chronicle of Transformative Developments"
"Lesotho Leaps Forward: A Chronicle of Transformative Developments"
mphochane1998
 

Último (20)

Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
 
Theory of Time 2024 (Universal Theory for Everything)
Theory of Time 2024 (Universal Theory for Everything)Theory of Time 2024 (Universal Theory for Everything)
Theory of Time 2024 (Universal Theory for Everything)
 
Thermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VThermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - V
 
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
 
Integrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - NeometrixIntegrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - Neometrix
 
Standard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power PlayStandard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power Play
 
Thermal Engineering Unit - I & II . ppt
Thermal Engineering  Unit - I & II . pptThermal Engineering  Unit - I & II . ppt
Thermal Engineering Unit - I & II . ppt
 
NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...
NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...
NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...
 
DC MACHINE-Motoring and generation, Armature circuit equation
DC MACHINE-Motoring and generation, Armature circuit equationDC MACHINE-Motoring and generation, Armature circuit equation
DC MACHINE-Motoring and generation, Armature circuit equation
 
Unleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leapUnleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leap
 
Learn the concepts of Thermodynamics on Magic Marks
Learn the concepts of Thermodynamics on Magic MarksLearn the concepts of Thermodynamics on Magic Marks
Learn the concepts of Thermodynamics on Magic Marks
 
Orlando’s Arnold Palmer Hospital Layout Strategy-1.pptx
Orlando’s Arnold Palmer Hospital Layout Strategy-1.pptxOrlando’s Arnold Palmer Hospital Layout Strategy-1.pptx
Orlando’s Arnold Palmer Hospital Layout Strategy-1.pptx
 
FEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced Loads
FEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced LoadsFEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced Loads
FEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced Loads
 
Introduction to Serverless with AWS Lambda
Introduction to Serverless with AWS LambdaIntroduction to Serverless with AWS Lambda
Introduction to Serverless with AWS Lambda
 
Generative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTGenerative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPT
 
Design For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the startDesign For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the start
 
data_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfdata_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdf
 
PE 459 LECTURE 2- natural gas basic concepts and properties
PE 459 LECTURE 2- natural gas basic concepts and propertiesPE 459 LECTURE 2- natural gas basic concepts and properties
PE 459 LECTURE 2- natural gas basic concepts and properties
 
Hospital management system project report.pdf
Hospital management system project report.pdfHospital management system project report.pdf
Hospital management system project report.pdf
 
"Lesotho Leaps Forward: A Chronicle of Transformative Developments"
"Lesotho Leaps Forward: A Chronicle of Transformative Developments""Lesotho Leaps Forward: A Chronicle of Transformative Developments"
"Lesotho Leaps Forward: A Chronicle of Transformative Developments"
 

File System and File allocation tables

  • 1. File System & File allocation table(FAT) PREPARED BY: DAVE SUSHILKUMAR A. PABARI SHASHIKANT C. PAMBHAR VISHAL G.
  • 2. File System The collection of algorithms and data structures which perform the translation from logical file operations (system calls) to actual physical storage of information. 2
  • 3. What Does a File System Do?  Responsibilities  Creating, manipulating, renaming, copying, and removing files to and from a storage device  Organizing files into common storage units  Called directories  Keeping track of file and directory locations  Assisting users  Relate files and folders to the physical structure of the storage medium 3
  • 4.  Files used by operating systems and applications  Word-processing documents  Source code for programs you have written  Music files  Movie files  Spreadsheets  Photos  Operating systems use a file folder icon to represent a directory 4
  • 5. Layered File System  Logical File System  Maintains file structure via FCB (file control block)  File organization module  Translates logical block to physical block  Basic File system  Converts physical block to disk parameters (drive 1, cylinder 73, track 2, sector 10 etc)  I/O Control  Transfers data between memory and disk 5
  • 6. Physical Disk Structure  Parameters to read from disk:  cylinder(=track) #  platter(=surface) #  sector #  transfer size Tracks Sectors within a Track Cluster 6
  • 7. File system Units  Sector – the smallest unit that can be accessed on a disk (typically 512 bytes)  Block(or Cluster) – the smallest unit that can be allocated to construct a file  What’s the actual size of 1 byte file on disk?  takes at least one cluster,  which may consist of 1~8 sectors,  thus 1byte file may require ~4KB disk space. 7
  • 9. FCB – File Control Block  Contains file attributes + block locations  Permissions  Dates (create, access, write)  Owner, group, ACL (Access Control List)  File size  Location of file contents  UNIX File System  I-node  FAT/FAT32  part of FAT (File Alloc. Table)  NTFS  part of MFT (Master File Table) 9
  • 10. File System Implementation  Contiguous allocation  Linked list allocation  Linked list allocation using an index (DOS file allocation table - FAT) 10
  • 11. Contiguous Allocation  The file is stored as a contiguous block of data allocated at file creation (a) Contiguous allocation of disk space for 7 files (b) State of the disk after files D and E have been removed 11
  • 12. Contiguous Allocation (Cont.)  FAT (file allocation table) contains file name, start block, length  Advantages  Simple to implement (start block & length is enough to define a file)  Fast access as blocks follow each other  Disadvantages  Fragmentation  Re-allocation (compaction) 12
  • 13. Linked List Allocation  The file is stored as a linked list of blocks 13
  • 14. Linked List Allocation (Cont.)  Each block contains a pointer to the next block  FAT (file allocation table) contains file name, first block address  Advantages  Fragmentation is eliminated  Block size is not a power of 2 because of pointer space  Disadvantages  Random access is very slow as links have to be followed 14
  • 15. Indexed Block Allocation  Indexed allocation  Each file has its own index block(s) of pointers to its data blocks  Logical view index table 15
  • 16. Indexed Allocation (Cont.)  Need index table  Random access  Dynamic access without external fragmentation, but have overhead of index block  Mapping from logical to physical in a file of maximum size of 256K bytes and block size of 512 bytes. We need only 1 block for index table Q = displacement into index table R = displacement into block LA/512 Q R 16
  • 17. Indexed Allocation – Mapping (Cont.)  Mapping from logical to physical in a file of unbounded length (block size of 512 words)  Linked scheme – Link blocks of index table (no limit on size) LA / (512 x 511) Q1 R1 Q1 = block of index table R1 is used as follows: R1 / 512 Q2 R2 Q2 = displacement into block of index table R2 displacement into block of file: 17
  • 18. Indexed Allocation – Mapping (Cont.)  Two-level index (4K blocks could store 1,024 four-byte pointers in outer index -> 1,048,567 data blocks and file size of up to 4GB) LA / (512 x 512) Q1 R1 Q1 = displacement into outer-index R1 is used as follows: R1 / 512 Q2 R2 Q2 = displacement into block of index table R2 displacement into block of file: 18
  • 19. File Allocation Table FAT File System • The File Allocation Table (FAT) file system is a simple file system originally designed for small disks and simple folder structures. • The FAT file system is named for its method of organization, the file allocation table, which resides at the beginning of the volume. • To protect the volume, two copies of the table are kept, in case one becomes damaged. In addition, the file allocation tables and the root folder must be stored in a fixed location so that the files needed to start the system can be correctly located. • A volume formatted with the FAT file system is allocated into clusters. • The default cluster size is determined by the size of the volume. • For the FAT file system, the cluster number must fit in 16 bits and be a power of 2. FAT File System 19
  • 20. • The way FAT works is that it keeps a record at the start of the drive of all the files, and to point to the files, it points to the clusters that contain the files. • The main rule of clusters is that there cannot be more than 1 file per cluster; otherwise, pointing to that cluster would cause problems, as it would be pointing and doing read/write operations on two files at once, which would cause Windows to crash. • Depending on the size and FAT version of the partition, the cluster size can vary. • Also keep in mind that a section of the partition is reserved for the FAT, which is the record of each file and where it can be found. This changes in size depending on the size of the partition and clusters. How FAT Works The FAT Family  FAT12, FAT16, FAT32  12, 16, and 32 are the number of bits used in the FAT for cluster addresses 20
  • 21.  FAT32 is a derivative of the File Allocation Table (FAT) file system that supports drives with over 2GB of storage. Because FAT32 drives can contain more than 65,526 clusters, smaller clusters are used than on large FAT16 drives. This method results in more efficient space allocation on the FAT32 drive.  The largest possible file for a FAT32 drive is 4GB minus 2 bytes.  The FAT32 file system includes four bytes per cluster within the file allocation table. Note that the high 4 bits of the 32-bit values in the FAT32 file allocation table are reserved and are not part of the cluster number. FAT32 File System 21
  • 22. Creating a FAT File System  High-level formatting creates file system data structures  Boot sector  Cluster allocation  File Allocation Table (FAT)  $Bitmap in the Master File Table (MFT) for NTFS  Exact details depend on operating system  Root Directory 22
  • 23. Each FAT type has its limits; this table displays these limits: FAT type Max Clusters Cluster sizes Max volume size FAT12 4,086 0.5 to 4KB 16,736,256 bytes (16MB) FAT16 65,526 2KB to 32KB 2,147,483,648 bytes (2GB) FAT32 268,435,456 4KB to 32KB 8,796,093,022,208 bytes (8TB) FAT Limitations 23
  • 24. Deleted File Recovery All Cluster Pointers in the FAT are gone!  Option 1 Grab the next n-1 consecutive clusters. Call it the file. May have allocated or unallocated clusters from other files. WinHex uses this option.  Option 2 Grab the next n-1 unallocated clusters using the FAT. Call it the file. May have unallocated clusters from other deleted files. EnCase uses this option. • Get the first cluster from the directory entry • Get size from directory entry • Calculate the number of clusters allocated to the file, n. 24
  • 25. 25