Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Read and answer the folowing questions and explain all the steps involved in get

ID: 3580261 • Letter: R

Question

Read and answer the folowing questions and explain all the steps involved in getting the output ?

The File Allocation Table (FAT) partition boot sector includes information shown in below table 1. The boot sector contains
information on how to use the FAT partition. Note that FAT entries are stored as little endian.

Table 1 : Information in a FAT partition boot sector
Address Description and Size (Bytes)
0x00B Bytes per sector 2
0x00D Sectors per cluster 1
0x00E Number of reserved sectors (usually 32 for FAT32) 2
0x010 Number of file allocation tables (usually 2) 1
0x013 Total number of sectors (value if < 2 16 else 0) 2
0x020 Total number of sectors (value if > 2 16 else 0) 4
0x024 Number of sectors per file allocation table 4
0x02C Cluster number of root directory (usually 2) 4
0x05A Operating system boot code 420
0x1FE Boot signature 0x55 1
0x1FF Boot signature 0xAA 1
Information from the FAT partition boot sector stored at sector 2048 on an SD card has been extracted to give the
following results:
Extract boot sector information...
-> bytesPerSector = 512
-> sectorsPerCluster = 8
-> reservedSectors = 694
-> numFAT = 2
-> totalSectors16 = 0
-> totalSectors32 = 3846144
-> sectorsPerFAT = 3749
-> startRootCluster = 2
-> infoSector = 1
-> signatureCheck16 = 0xaa55

The meaning of entries in the FAT for FAT32 is given in Table 2. The FAT provides information on clusters that
store information.

Table 2: Meaning of FAT32 entries
Value and Meaning
0x00000000 Free cluster
0x00000020-0x0FFFFFEF Used cluster (value points to next cluster in the chain)
0x0FFFFFF7 Bad sector in cluster
0x0FFFFFF8-0x0FFFFFFF Last cluster in file

The following questions relate to the information provided above.

a) What is the minimum size, in bytes, that can be allocated to a file?

b) The number of file allocation tables is two. What would be a reason for having more than one?

c) What is the sector number of the file allocation table?

A small number of files have been added to the root directory in a newly created example FAT32 file system. The
used entries in the FAT are shown in Table 3.

Table 3: Example FAT32 entries
Numbers and Entry
0x00000000 0x0ffffff8
0x00000001 0xffffffff
0x00000002 0x0fffffff
0x00000003 0x0fffffff
0x00000004 0x0fffffff
0x00000005 0x00000006
0x00000006 0x00000007
0x00000007 0x0fffffff
0x00000008 0x00000009
0x00000009 0x0000000a
0x0000000a 0x0000000b
0x0000000b 0x0000000c
0x0000000c 0x0fffffff
0x0000000d 0x0000000e
0x0000000e 0x0fffffff

d) The cluster chain for the root directory starts at 0x00000002 in the FAT shown in Table 3. Other than the root directory, how many other files are in the FAT?

Explanation / Answer

Could there be 4,000 bytes of metadata about 1 byte of plain text?

FAT32 system uses 16 KB clusters for partition sizes between 16 and 32 GB. A 20 KB file would require two 16 KB clusters actually occupying 32 KB of space. A mere 1 KB file still requires 16 KB of space. A typical large disk might have 30% or even 40% of its space wasted this way. Making smaller partitions alleviates slack but with 200 GB disks now common, and ever-bigger ones on the way, partitioning is no longer a practical solution.

The minimum allowed value for non-bootable FAT12/FAT16 volumes with up to 65535 logical sectors is 32 bytes, or 64 bytes for more than 65535 logical sectors. The minimum practical value is 128. Some pre-DOS 3.31 OEM versions of DOS used logical sector sizes up to 8192 bytes for logical sectored FATs. Atari ST GEMDOS supports logical sector sizes between 512 and 4096.[22] DR-DOS supports booting off FAT12/FAT16 volumes with logical sector sizes up to 32 KB and INT 13h implementations supporting physical sectors up to 1024 bytes/sector.[nb 6] The minimum logical sector size for standard FAT32 volumes is 512 bytes, which can be reduced downto 128 bytes without support for the FS Information Sector.

A FAT32 FAT entry actually uses low 28- bits to address clusters. The high 4 bits of a FAT32 FAT entry are reserved and are only changed when the volume is formatted, at which time the whole 32-bit FAT entry should be zeroed, including the high 4 bits. This means all of these 32-bit cluster entry values: 0xA0000000, 0xB0000000, and 0x00000000 indicate a free cluster as the low 28 bits are set to 0

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote