《操作系统原理与设计 Operating System Principles and Implementation》课程教学课件(英文讲稿)Chapter 10 Details of FAT32

Operating SystemsCh10, part 1Details of FAT32T
Operating Systems Ch10, part 1 Details of FAT32 1

TopicsinCh10: Case studyDetailsofFAT32File attributes and directory entries, file operationsDetailsofExt2/3/4Detailed layout, detailed inode structure (file attributes), FS operations...2
Topics in Ch10 • Case study 2 File attributes and directory entries, file operations Details of FAT32 Detailed layout, detailed inode structure (file attributes), FS operations. Details of Ext2/3/4

DetailsofFAT32IntroductionDirectory and File Attributes File Operations-Readfiles-Writefiles-Deletefiles-RecoverdeletedfilesMicrosoftExtensibleFirmwareInitiativeFAT32FileSystemSpecification (FAT:GeneralOverviewofOn-DiskFormat),Version1.03,December6,2000,hardwarewhitepapers@MicrosoftCorporation.3
Details of FAT32 • Introduction • Directory and File Attributes • File Operations – Read files – Write files – Delete files – Recover deleted files 3 Microsoft Extensible Firmware Initiative FAT32 File System Specification (FAT: General Overview of On-Disk Format), Version 1.03, December 6, 2000, hardware white papers @ Microsoft Corporation

Recall on FATallocation· The layoutAblockisnamedaclusterFAT12FAT16FAT32FileSystemClusteraddr length12bits16bits32bits(28?)NumberofFilenameFirst4K64K256MBlock#clustersrock.mp3119game.exe7ubuntu.iso252627282930671819Block#802900262002730NextBlock#2EREEFileRootAllocationDirectoryTable(FAT)个←1+11121304
Recall on FAT allocation • The layout 4 A block is named a cluster. File System FAT12 FAT16 FAT32 Cluster addr length 12 bits 16 bits 32 bits (28?) Number of clusters 4K 64K 256M

TriviaWhenasectoris>512B.? Cluster Size:512B1KB2KB4KB8KB16KB32KB64KB128KB256KB- Try typing “help format" in the command prompt inWindows. Calculating the maximum partition size-withtheclustersize=32KB...(32 × 210) × 228 = 243 (8TB)5
Trivia • Cluster Size: – Try typing “help format” in the command prompt in Windows. • Calculating the maximum partition size – with the cluster size = 32KB. 5 512B 1KB 2KB 4KB 8KB 16KB 32KB 64KB 128KB 256KB When a sector is > 512B . 32 × 2 10 × 2 28 = 2 43 (8𝑇𝐵)

Typical layoutof a FAT32partitionSizeProposeBoot sectorStore FS-specific parameters1 sector,512bytesFSINFOFree-spacemanagement1sector,512bytesReservedDon'taskme,askMicrosoft!Variable,can bechanged during format.sectorsArobustdesign:if"FAT1"isVariable.dependsondisksizeancFAT (2pieces)corrupted or containing bad sectors,clustersize.then"FAT2"canactasa backupAtleastonecluster,dependontheRoot directoryStart of the directory tree.numberof director entries.RootBootFAT1FAT2FSINFODirectorySector6
Typical layout of a FAT32 partition 6 Root Directory FAT1 FAT2 Boot Sector FSINFO Propose Size Boot sector Store FS-specific parameters 1 sector, 512 bytes FSINFO Free-space management 1 sector, 512 bytes Reserved sectors Don’t ask me, ask Micro$oft! Variable, can be changed during format. FAT (2 pieces) A robust design: if “FAT 1” is corrupted or containing bad sectors, then “FAT 2” can act as a backup. Variable, depends on disk size and cluster size. Root directory Start of the directory tree. At least one cluster, depend on the number of director entries

Typical layout of a FAT32partition$sudo mkfs.vfat-F32/dev/ramoFormatthedisk,"-F32"meansFAT32mkfs.fat3.0.28(2015-05-16)$sudodosfsck-v/dev/rameRead the informationstored inthe boot sectorRunning"dosfsck",DOsfilesystemcheck,onaFAT32FS.ThisprogramreadsdetailsfromtheBootSector.BootRootFAT1FAT2FSINFODirectorySector
Typical layout of a FAT32 partition 7 $ sudo mkfs.vfat -F32 /dev/ram0 mkfs.fat 3.0.28 (2015-05-16) . $ sudo dosfsck -v /dev/ram0 Root Directory FAT1 FAT2 Boot Sector FSINFO Format the disk, “-F32” means FAT32. Read the information stored in the boot sector. Running “dosfsck”, DOS file system check, on a FAT32 FS. This program reads details from the Boot Sector

Typical layout of a FAT32 partition$ sudo mkfs.vfat-F32/dev/ramemkfs.fat 3.0.28(2015-05-16)DetailsoftheBootSector$ sudo dosfsck-v /dev/ramefsck.fat3.0.28(2015-05-16)Checking we can access the last sector of the filesystemBoot sector contents:System ID "mkfs.fat"Media byte oxf8(hard disk)512 bytes per logical sectorThebootsectorsays:512 bytesper clusterAclusterismadeof1sector.32reserved sectorsFirst FAT starts at byte 16384 (sector 32)2 FATs, 32 bit entries516608 bytesperFAT (=1009sectors)Root directory start at cluster 2 (arbitrary size)Data area starts at byte 1049600(sector 2050)Oneclustersize:512129022data clusters(66059264bytes)bytesinthiscase卡RootBootFAT1FAT2FSINFODirectorySector32sectors8
Typical layout of a FAT32 partition 8 Root Directory FAT1 FAT2 Boot Sector FSINFO $ sudo mkfs.vfat -F32 /dev/ram0 mkfs.fat 3.0.28 (2015-05-16) . $ sudo dosfsck -v /dev/ram0 fsck.fat 3.0.28 (2015-05-16) Checking we can access the last sector of the filesystem Boot sector contents: System ID "mkfs.fat" Media byte 0xf8 (hard disk) 512 bytes per logical sector 512 bytes per cluster 32 reserved sectors First FAT starts at byte 16384 (sector 32) 2 FATs, 32 bit entries 516608 bytes per FAT (= 1009 sectors) Root directory start at cluster 2 (arbitrary size) Data area starts at byte 1049600 (sector 2050) 129022 data clusters (66059264 bytes) . The boot sector says: A cluster is made of 1 sector. One cluster size: 512 bytes in this case Details of the Boot Sector 32 sectors

Typical layoutof aFAT32partition$ sudo mkfs.vfat-F32/dev/ramemkfs.fat3.0.28(2015-05-16)$ sudo dosfsck-v /dev/ramefsck.fat3.0.28(2015-05-16)Checking we can access the last sector of the filesystemBoot sector contents:System ID "mkdosfs"Media byte xf8 (hard disk)Thebootsectorsays:512 bytes per logical sector2FATsandeachof themisof512 bytes per cluster32reserved sectorssize516,608bytes.FirstFATstarts atbyte 16384 (sector 32)2FATs, 32 bit entries516608bytesperFAT(=1009sectors)NumberofFATsandtheRoot directory start at cluster 2 (arbitrary size)lengthofeachentryinaFAT.Data area starts at byte 1049600 (sector 2050)129022dataclusters(66059264bytes)Good!Noslackspace betweenreserved sectorsofthefirstFATRootBootFAT1FAT2FSINFODirectorySector32sectors100910099
Typical layout of a FAT32 partition 9 Root Directory FAT1 FAT2 Boot Sector FSINFO $ sudo mkfs.vfat -F32 /dev/ram0 mkfs.fat 3.0.28 (2015-05-16) . $ sudo dosfsck -v /dev/ram0 fsck.fat 3.0.28 (2015-05-16) Checking we can access the last sector of the filesystem Boot sector contents: System ID "mkdosfs" Media byte 0xf8 (hard disk) 512 bytes per logical sector 512 bytes per cluster 32 reserved sectors First FAT starts at byte 16384 (sector 32) 2 FATs, 32 bit entries 516608 bytes per FAT (= 1009 sectors) Root directory start at cluster 2 (arbitrary size) Data area starts at byte 1049600 (sector 2050) 129022 data clusters (66059264 bytes) . The boot sector says: 2 FATs and each of them is of size 516,608 bytes. 32 sectors 1009 1009 Number of FATs and the length of each entry in a FAT. Good! No slack space between reserved sectors of the first FAT

Typical layoutof a FAT32partition$sudomkfs.vfat-F32/dev/ramemkfs.fat3.0.28(2015-05-16)$ sudodosfsck-v /dev/ramefsck.fat3.0.28(2015-05-16)The first data cluster isChecking we can access the last sector of the filesystemCluster#2and it isusually,Boot sector contents:notalways,therootSystem ID "mkdosfs"Media byte xf8 (hard disk)directory.512 bytes per logical sector512 bytes per clusterCluster#0 are32 reserved sectorsreserved.First FAT startsat byte 16384 (sector32)2FATs,32 bit entries516608 bytes perFAT (=1009sectors)Root directory start at cluster 2 (arbitrary size)Data area starts at byte 1049600(sector 2050)32+1009x2=2050129022 data clusters(66059264 bytes)BootRootFAT1FAT2FSINFODirectorySector1009100932sectors2050 and beyond...10
Typical layout of a FAT32 partition 10 Root Directory FAT1 FAT2 Boot Sector FSINFO $ sudo mkfs.vfat -F32 /dev/ram0 mkfs.fat 3.0.28 (2015-05-16) . $ sudo dosfsck -v /dev/ram0 fsck.fat 3.0.28 (2015-05-16) Checking we can access the last sector of the filesystem Boot sector contents: System ID "mkdosfs" Media byte 0xf8 (hard disk) 512 bytes per logical sector 512 bytes per cluster 32 reserved sectors First FAT starts at byte 16384 (sector 32) 2 FATs, 32 bit entries 516608 bytes per FAT (= 1009 sectors) Root directory start at cluster 2 (arbitrary size) Data area starts at byte 1049600 (sector 2050) 129022 data clusters (66059264 bytes) . The first data cluster is Cluster #2 and it is usually, not always, the root directory. Cluster #0 & #1 are reserved. 32 sectors 1009 1009 2050 and beyond. 32 + 1009 x 2 = 2050
按次数下载不扣除下载券;
注册用户24小时内重复下载只扣除一次;
顺序:VIP每日次数-->可用次数-->下载券;
- 《操作系统原理与设计 Operating System Principles and Implementation》课程教学课件(英文讲稿)Chapter 9 File Systems part2.pdf
- 《操作系统原理与设计 Operating System Principles and Implementation》课程教学课件(英文讲稿)Chapter 9 File Systems part1.pdf
- 《操作系统原理与设计 Operating System Principles and Implementation》课程教学课件(英文讲稿)Chapter 8 Mass Storage.pdf
- 《操作系统原理与设计 Operating System Principles and Implementation》课程教学课件(英文讲稿)Chapter 7 Memory Management part2.pdf
- 《操作系统原理与设计 Operating System Principles and Implementation》课程教学课件(英文讲稿)Chapter 7 Memory Management part1.pdf
- 《操作系统原理与设计 Operating System Principles and Implementation》课程教学课件(英文讲稿)Chapter 6 Process Scheduling.pdf
- 《操作系统原理与设计 Operating System Principles and Implementation》课程教学课件(英文讲稿)Chapter 5 Process Communication & Synchronization -Part 2.pdf
- 《操作系统原理与设计 Operating System Principles and Implementation》课程教学课件(英文讲稿)Chapter 5 Process Communication & Synchronization(part1).pdf
- 《操作系统原理与设计 Operating System Principles and Implementation》课程教学课件(英文讲稿)Chapter 4 Threads.pdf
- 《操作系统原理与设计 Operating System Principles and Implementation》课程教学课件(英文讲稿)Chapter 3 Process Concepts & Operations(part2)from Kernel's Perspective.pdf
- 《操作系统原理与设计 Operating System Principles and Implementation》课程教学课件(英文讲稿)Chapter 3 Process Concepts & Operations(part1).pdf
- 《操作系统原理与设计 Operating System Principles and Implementation》课程教学课件(英文讲稿)Chapter 2 Operating System Structures.pdf
- 《操作系统原理与设计 Operating System Principles and Implementation》课程教学课件(英文讲稿)Chapter 1 Overview of an Operating System.pdf
- 《计算机网络》课程教学资源(PPT课件)第六章 应用层.pptx
- 《计算机网络》课程教学资源(PPT课件)第五章 传输层.pptx
- 《计算机网络》课程教学资源(PPT课件)第四章 网络层.pptx
- 《计算机网络》课程教学资源(PPT课件)第三章 数据链路层.pptx
- 《计算机网络》课程教学资源(PPT课件)第二章 物理层.pptx
- 《计算机网络》课程教学资源(PPT课件)第一章 概述.pptx
- 《智能算法设计与应用》课程教学大纲 Intelligent Algorithm Design and Application.docx
- 《操作系统原理与设计 Operating System Principles and Implementation》课程教学课件(英文讲稿)Chapter 10 Details of Ext2/3 File System.pdf
- 北京工业大学:信息科学技术学院《C#程序设计基础》课程教学大纲 Fundamentals of Programming Principle and Practice in C#.pdf
- 北京工业大学:计算机学院本科课程教学大纲汇编(2024).pdf
- 揭阳职业技术学院:《计算机应用基础》课程授课教案(讲义,2025).pdf
- 《C语言程序设计》课程教学课件(PPT讲稿)第10章 对文件的输入输出.pptx
- 《C语言程序设计》课程教学课件(PPT讲稿)第01章 程序设计和C语言.pptx
- 《C语言程序设计》课程教学课件(PPT讲稿)第02章 算法——程序的灵魂.pptx
- 《C语言程序设计》课程教学课件(PPT讲稿)第03章 最简单的C程序设计——顺序程序设计.pptx
- 《C语言程序设计》课程教学课件(PPT讲稿)第04章 选择结构程序设计.pptx
- 《C语言程序设计》课程教学课件(PPT讲稿)第05章 循环结构程序设计.pptx
- 《C语言程序设计》课程教学课件(PPT讲稿)第06章 利用数组处理批量数据.pptx
- 《C语言程序设计》课程教学课件(PPT讲稿)第07章 用函数实现模块化程序设计.pptx
- 《C语言程序设计》课程教学课件(PPT讲稿)第08章 善于利用指针.pptx
- 《C语言程序设计》课程教学课件(PPT讲稿)第09章 用户自己建立数据类型.pptx
