SlideShare a Scribd company logo
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

More Related Content

What's hot

directory structure and file system mounting
directory structure and file system mountingdirectory structure and file system mounting
directory structure and file system mounting
rajshreemuthiah
 
NTFS vs FAT
NTFS vs FATNTFS vs FAT
NTFS vs FAT
Tanveer Ahmed
 
Chapter 11 - File System Implementation
Chapter 11 - File System ImplementationChapter 11 - File System Implementation
Chapter 11 - File System Implementation
Wayne Jones Jnr
 
File system
File systemFile system
File system
Harleen Johal
 
NTFS.ppt
NTFS.pptNTFS.ppt
NTFS.ppt
jlmansilla
 
File organization 1
File organization 1File organization 1
File organization 1
Rupali Rana
 
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
sgpraju
 
Segmentation in Operating Systems.
Segmentation in Operating Systems.Segmentation in Operating Systems.
Segmentation in Operating Systems.
Muhammad SiRaj Munir
 
Linux file system
Linux file systemLinux file system
Linux file system
Md. Tanvir Hossain
 
File system
File systemFile system
File system
Harleen Johal
 
Free Space Management, Efficiency & Performance, Recovery and NFS
Free Space Management, Efficiency & Performance, Recovery and NFSFree Space Management, Efficiency & Performance, Recovery and NFS
Free Space Management, Efficiency & Performance, Recovery and NFS
United International University
 
Opetating System Memory management
Opetating System Memory managementOpetating System Memory management
Opetating System Memory management
Johan Granados Montero
 
File System in Operating System
File System in Operating SystemFile System in Operating System
File System in Operating System
Meghaj Mallick
 
File Management in Operating Systems
File Management in Operating SystemsFile Management in Operating Systems
File Management in Operating Systems
vampugani
 
file system in operating system
file system in operating systemfile system in operating system
file system in operating systemtittuajay
 
Windows File Systems
Windows File SystemsWindows File Systems
Windows File Systems
primeteacher32
 
File System Implementation - Part1
File System Implementation - Part1File System Implementation - Part1
File System Implementation - Part1
Amir Payberah
 
Mass Storage Structure
Mass Storage StructureMass Storage Structure
Mass Storage Structure
Vimalanathan D
 
Disk management
Disk managementDisk management
Disk management
Agnas Jasmine
 
Ext filesystem4
Ext filesystem4Ext filesystem4
Ext filesystem4
Neha Kulkarni
 

What's hot (20)

directory structure and file system mounting
directory structure and file system mountingdirectory structure and file system mounting
directory structure and file system mounting
 
NTFS vs FAT
NTFS vs FATNTFS vs FAT
NTFS vs FAT
 
Chapter 11 - File System Implementation
Chapter 11 - File System ImplementationChapter 11 - File System Implementation
Chapter 11 - File System Implementation
 
File system
File systemFile system
File system
 
NTFS.ppt
NTFS.pptNTFS.ppt
NTFS.ppt
 
File organization 1
File organization 1File organization 1
File organization 1
 
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
 
Segmentation in Operating Systems.
Segmentation in Operating Systems.Segmentation in Operating Systems.
Segmentation in Operating Systems.
 
Linux file system
Linux file systemLinux file system
Linux file system
 
File system
File systemFile system
File system
 
Free Space Management, Efficiency & Performance, Recovery and NFS
Free Space Management, Efficiency & Performance, Recovery and NFSFree Space Management, Efficiency & Performance, Recovery and NFS
Free Space Management, Efficiency & Performance, Recovery and NFS
 
Opetating System Memory management
Opetating System Memory managementOpetating System Memory management
Opetating System Memory management
 
File System in Operating System
File System in Operating SystemFile System in Operating System
File System in Operating System
 
File Management in Operating Systems
File Management in Operating SystemsFile Management in Operating Systems
File Management in Operating Systems
 
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
 
File System Implementation - Part1
File System Implementation - Part1File System Implementation - Part1
File System Implementation - Part1
 
Mass Storage Structure
Mass Storage StructureMass Storage Structure
Mass Storage Structure
 
Disk management
Disk managementDisk management
Disk management
 
Ext filesystem4
Ext filesystem4Ext filesystem4
Ext filesystem4
 

Viewers also liked

Linked allocation 48
Linked  allocation 48Linked  allocation 48
Linked allocation 48myrajendra
 
Index allocation 48 1
Index allocation 48 1Index allocation 48 1
Index allocation 48 1myrajendra
 
Secondary storage management in os
Secondary storage management in osSecondary storage management in os
Secondary storage management in osSumant Diwakar
 
Operation System
Operation SystemOperation System
Operation System
ANANTHI1997
 
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
Sneh Prabha
 

Viewers also liked (6)

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
 

Similar to File System and File allocation tables

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
Chinmaya M. N
 
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)
Chinmaya M. N
 
Fat File Systems
Fat File SystemsFat File Systems
Fat File Systems
ArthyR3
 
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 userHarman 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 UserHarman Gahir
 
Os
OsOs
File System
File SystemFile System
File System
Thayalan Danusan
 
Ch12 OS
Ch12 OSCh12 OS
Ch12 OSC.U
 
Introduction to filesystems and computer forensics
Introduction to filesystems and computer forensicsIntroduction to filesystems and computer forensics
Introduction to filesystems and computer forensics
Mayank Chaudhari
 
file management_part2_os_notes.ppt
file management_part2_os_notes.pptfile management_part2_os_notes.ppt
file management_part2_os_notes.ppt
HelalMirzad
 
Microsoft Windows File System in Operating System
Microsoft Windows File System in Operating SystemMicrosoft Windows File System in Operating System
Microsoft Windows File System in Operating System
Meghaj Mallick
 
Windows 7
Windows 7Windows 7
Windows 7
Mumbere Joab
 
DBMS
DBMSDBMS
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
Lisa Liao
 
Guide to Windows 7 - Managing File Systems
Guide to Windows 7 - Managing File SystemsGuide to Windows 7 - Managing File Systems
Guide to Windows 7 - Managing File Systems
Gene Carboni
 

Similar to 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
 
OS_Ch12
OS_Ch12OS_Ch12
OS_Ch12
 
OSCh12
OSCh12OSCh12
OSCh12
 
Ch12 OS
Ch12 OSCh12 OS
Ch12 OS
 
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
 
Microsoft Windows File System in Operating System
Microsoft Windows File System in Operating SystemMicrosoft Windows File System in Operating System
Microsoft Windows File System in Operating System
 
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
 
Guide to Windows 7 - Managing File Systems
Guide to Windows 7 - Managing File SystemsGuide to Windows 7 - Managing File Systems
Guide to Windows 7 - Managing File Systems
 

More from shashikant pabari

Remote spy(Real Time Spy)
Remote  spy(Real Time Spy)Remote  spy(Real Time Spy)
Remote spy(Real Time Spy)
shashikant pabari
 
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
shashikant pabari
 
Basic concept of c++
Basic concept of c++Basic concept of c++
Basic concept of c++
shashikant pabari
 
Imap(internet massege access protocaols)
Imap(internet massege access protocaols)Imap(internet massege access protocaols)
Imap(internet massege access protocaols)
shashikant pabari
 
Data representation
Data representationData representation
Data representation
shashikant pabari
 
Newton cotes integration method
Newton cotes integration  methodNewton cotes integration  method
Newton cotes integration method
shashikant pabari
 

More from 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
 

Recently uploaded

一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
bakpo1
 
Cosmetic shop management system project report.pdf
Cosmetic shop management system project report.pdfCosmetic shop management system project report.pdf
Cosmetic shop management system project report.pdf
Kamal Acharya
 
ML for identifying fraud using open blockchain data.pptx
ML for identifying fraud using open blockchain data.pptxML for identifying fraud using open blockchain data.pptx
ML for identifying fraud using open blockchain data.pptx
Vijay Dialani, PhD
 
road safety engineering r s e unit 3.pdf
road safety engineering  r s e unit 3.pdfroad safety engineering  r s e unit 3.pdf
road safety engineering r s e unit 3.pdf
VENKATESHvenky89705
 
J.Yang, ICLR 2024, MLILAB, KAIST AI.pdf
J.Yang,  ICLR 2024, MLILAB, KAIST AI.pdfJ.Yang,  ICLR 2024, MLILAB, KAIST AI.pdf
J.Yang, ICLR 2024, MLILAB, KAIST AI.pdf
MLILAB
 
WATER CRISIS and its solutions-pptx 1234
WATER CRISIS and its solutions-pptx 1234WATER CRISIS and its solutions-pptx 1234
WATER CRISIS and its solutions-pptx 1234
AafreenAbuthahir2
 
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&BDesign and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Sreedhar Chowdam
 
Hierarchical Digital Twin of a Naval Power System
Hierarchical Digital Twin of a Naval Power SystemHierarchical Digital Twin of a Naval Power System
Hierarchical Digital Twin of a Naval Power System
Kerry Sado
 
DESIGN A COTTON SEED SEPARATION MACHINE.docx
DESIGN A COTTON SEED SEPARATION MACHINE.docxDESIGN A COTTON SEED SEPARATION MACHINE.docx
DESIGN A COTTON SEED SEPARATION MACHINE.docx
FluxPrime1
 
HYDROPOWER - Hydroelectric power generation
HYDROPOWER - Hydroelectric power generationHYDROPOWER - Hydroelectric power generation
HYDROPOWER - Hydroelectric power generation
Robbie Edward Sayers
 
power quality voltage fluctuation UNIT - I.pptx
power quality voltage fluctuation UNIT - I.pptxpower quality voltage fluctuation UNIT - I.pptx
power quality voltage fluctuation UNIT - I.pptx
ViniHema
 
H.Seo, ICLR 2024, MLILAB, KAIST AI.pdf
H.Seo,  ICLR 2024, MLILAB,  KAIST AI.pdfH.Seo,  ICLR 2024, MLILAB,  KAIST AI.pdf
H.Seo, ICLR 2024, MLILAB, KAIST AI.pdf
MLILAB
 
Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024
Massimo Talia
 
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
obonagu
 
weather web application report.pdf
weather web application report.pdfweather web application report.pdf
weather web application report.pdf
Pratik Pawar
 
Water Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdfWater Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation & Control
 
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdfTop 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Teleport Manpower Consultant
 
Gen AI Study Jams _ For the GDSC Leads in India.pdf
Gen AI Study Jams _ For the GDSC Leads in India.pdfGen AI Study Jams _ For the GDSC Leads in India.pdf
Gen AI Study Jams _ For the GDSC Leads in India.pdf
gdsczhcet
 
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdfAKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
SamSarthak3
 
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
thanhdowork
 

Recently uploaded (20)

一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
 
Cosmetic shop management system project report.pdf
Cosmetic shop management system project report.pdfCosmetic shop management system project report.pdf
Cosmetic shop management system project report.pdf
 
ML for identifying fraud using open blockchain data.pptx
ML for identifying fraud using open blockchain data.pptxML for identifying fraud using open blockchain data.pptx
ML for identifying fraud using open blockchain data.pptx
 
road safety engineering r s e unit 3.pdf
road safety engineering  r s e unit 3.pdfroad safety engineering  r s e unit 3.pdf
road safety engineering r s e unit 3.pdf
 
J.Yang, ICLR 2024, MLILAB, KAIST AI.pdf
J.Yang,  ICLR 2024, MLILAB, KAIST AI.pdfJ.Yang,  ICLR 2024, MLILAB, KAIST AI.pdf
J.Yang, ICLR 2024, MLILAB, KAIST AI.pdf
 
WATER CRISIS and its solutions-pptx 1234
WATER CRISIS and its solutions-pptx 1234WATER CRISIS and its solutions-pptx 1234
WATER CRISIS and its solutions-pptx 1234
 
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&BDesign and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
 
Hierarchical Digital Twin of a Naval Power System
Hierarchical Digital Twin of a Naval Power SystemHierarchical Digital Twin of a Naval Power System
Hierarchical Digital Twin of a Naval Power System
 
DESIGN A COTTON SEED SEPARATION MACHINE.docx
DESIGN A COTTON SEED SEPARATION MACHINE.docxDESIGN A COTTON SEED SEPARATION MACHINE.docx
DESIGN A COTTON SEED SEPARATION MACHINE.docx
 
HYDROPOWER - Hydroelectric power generation
HYDROPOWER - Hydroelectric power generationHYDROPOWER - Hydroelectric power generation
HYDROPOWER - Hydroelectric power generation
 
power quality voltage fluctuation UNIT - I.pptx
power quality voltage fluctuation UNIT - I.pptxpower quality voltage fluctuation UNIT - I.pptx
power quality voltage fluctuation UNIT - I.pptx
 
H.Seo, ICLR 2024, MLILAB, KAIST AI.pdf
H.Seo,  ICLR 2024, MLILAB,  KAIST AI.pdfH.Seo,  ICLR 2024, MLILAB,  KAIST AI.pdf
H.Seo, ICLR 2024, MLILAB, KAIST AI.pdf
 
Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024
 
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
 
weather web application report.pdf
weather web application report.pdfweather web application report.pdf
weather web application report.pdf
 
Water Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdfWater Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdf
 
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdfTop 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
 
Gen AI Study Jams _ For the GDSC Leads in India.pdf
Gen AI Study Jams _ For the GDSC Leads in India.pdfGen AI Study Jams _ For the GDSC Leads in India.pdf
Gen AI Study Jams _ For the GDSC Leads in India.pdf
 
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdfAKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
 
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
 

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