Karbosguide.com - Module 6a.2

About file systems (continued)

The contents:

  • The formatted disk
  • About sectors
  • About clusters
  • Small clusters with FAT32
  • Next page
  • Previous page


  • The formatted disk

    We know that a disk must be formatted with a file system , before it can accept files to be saved:

    Now let us examine the disk formatting process. How does it work?


    About sectors

    All disks are divided in 512 byte sectors. That is the standard size for the smallest disk unit. You could easily format with a different sector size, but that is not done. A sector is then the smallest disk unit and it holds 512 bytes of data.

    Sectors are created when the circular disk is organized in concentric tracks. Each track is divided into sectors. Each sector can hold 512 bytes.

    .

    But, how are these sectors distributed? How are the files placed in the sectors? How do we handle a file larger than 512 bytes, which must occupy more than one sector? Who keeps track of what is in each sector?

    This is a task for the file system. Below, we evaluate hard disks only and only FAT. Despite its age and flaws, it is still by far the most widely used file system. As for diskettes, read about diskette formatting .


    About clusters

    To continue in the understanding of the file system, we must introduce a new concept - clusters .

    Each sector holds 512 bytes and a sector is the smallest disk unit. However, often a sector is too small for DOS to handle. That is because DOS is a 16 bit operating system.

    By design, DOS can only handle 2 16 disk units at a time. A disk unit (my expression) is either a sector, or a cluster of sectors. Thus, DOS can only handle 65,536 of those!

    Therefore, in FAT formatting the sectors are gathered in clusters of 2, 4, 8, 16, 32, or 64 sectors:

    The cluster concept is an administrative invention. They are necessary, to allow DOS to handle large disks.

    They are also called allocation units . The number of sectors gathered in one cluster depends on the disk size:

    Disk size (partition size) Cluster size
    < 255 MB 8 sectors (4 KB)
    < 512 MB 16 sectors (8 KB)
    <1024 MB 32 sectors (16 KB)
    < 2048 MB 64 sectors (32 KB)

    In Dos, the data area of the hard disk is divided into a specified number of clusters, which of necessity increase in size with the size of the disk. On modern hard disks, the clusters will usually be 16 or 32 KB, as illustrated above


    Small clusters with FAT32

    The good news is that FAT32, found in the Windows 95 OSR2 and Windows 98, handles disk formatting much better than FAT16. With FAT32 it is possible to format hard disk partitions of more than 2 GB with small cluster sizes:

    Partition Cluster size
    <8 GB 4 KB
    8 GB - 16 GB 8 KB
    16 GB - 32 GB 16 KB
    > 32 GB 32 KB

    Something else new in FAT32 is the moveable root directory, which can be of variable size. It involves active use of both FATs (I cannot explain how). Altogether, it should make it simpler and safer to change partition sizes. But the number of clusters per partition grows enormously in large partitions.

    FAT32 can only be installed in a new PC, since the partition has to be formatted in a special manner. The file system is only available in the Windows 95 OSR2 (OEM Service Release 2) and in Windows 98.


  • Next page
  • Previous page


    To learn more

    Read Module 6b with a little about Windows 95/98.

    Read Module 6c about the relationship between BIOS, OS and hardware

    Read Module 7a about the videosystem

    Read about video cards in Module 7b .

    Read about digital sound in Module 7c .

    [Main page]
    [Karbo's Dictionary]
    [The Software Guides]