Reputation: 9579
Im trying to understand the concept of a "cluster" in a FAT filesystem. Specifically what is the relationship between a cluster, a Block, A Sector.
My understanding is the following 1) A Block/Page is 4096 bytes and a block is divided into sectors. 2) A sector is the smallest unit of storage on a disc. 3) Data us retrieved and stored in blocks/pages. 4) A disc has tracks and each track has Blocks/pages.
Is my understanding right? Im not sure where a cluster fits into all this.
Can someone clarify my understanding
Upvotes: 4
Views: 2920
Reputation: 23624
Quoting from this link:http://cquirke.mvps.org/9x/fat.htm
Cluster: Single unit of data storage at the FATxx file system logic level
Sector: Single unit of storage at the physical disk level
A cluster is the smallest unit of storage the operating system's file system can manage. For example, if a 1KB file is stored in a system with a 32KB cluster size (see table below), the 1KB file takes up 32KB of disk space. Below are the cluster sizes for the FAT32 file systems on Windows computers.
Disk Size Cluster size
512MB-8GB 4KB
8-16GB 8KB
16-32GB 16KB
32GB+ 32KB
Upvotes: 4
Reputation: 490048
A sector is the unit of storage on a disk drive set by the disk drive itself. This will typically be 256 bytes for a floppy disk or possibly a RAM disk, and 512 bytes for most hard disks.
A cluster is the unit of storage set by file system. It's (at least nearly) always some integer number of sectors, so the cluster size is an integer multiple of the sector size.
The term "page" isn't used very often in MS-DOS. x86 processors can define/use 4096-byte pages, but they do so in protected mode, whereas DOS runs in real mode (or a simulation thereof, such as a V86 task). Neither MS-DOS nor programs that run under it normally see or work with pages at all though (the exception being one that switches to protected mode itself, possibly using something like VCPI or DPMI).
The other term that is used in MS-DOS is a paragraph, which is 16 bytes of memory. That's the smallest quantity that can be addressed using only a segment address, without an offset. For example, when you allocate memory from MS-DOS, you specify the allocation size as a number of paragraphs.
Upvotes: 4