Gfdg

Páginas: 13 (3118 palabras) Publicado: 8 de abril de 2011
CSSE 332 – Operating Systems Spring 2004-2005

Rose-Hulman Institute of Technology Computer Science and Software Engineering Prof. Archana Chidanandan

An overview of FAT12 The File Allocation Table (FAT) is a table stored on a hard disk or floppy disk that indicates the status and location of all data clusters that are on the disk. The File Allocation Table can be considered to be the "tableof contents" of a disk. If the file allocation table is damaged or lost, then a disk is unreadable In this document, the FAT12 file system is described. The FAT12 is the file system on a floppy disk. The number “12” is derived from the fact that the FAT consists of 12-bit entries. The storage space on a floppy disk is divided into units called sectors. In larger storage devices, a bunch ofsectors form a cluster. However, for the floppy disk, the number of sectors in a cluster is one. Also, the size of a sector (and hence a cluster) is 512 bytes for a floppy disk.

1. Disk organization A floppy disk layout (FAT-12) consists of four major sections: the boot sector, FAT tables, root directory, and data area:

Figure 1 Disk organization of the FAT12 file system1 •





The bootsector consists of the first sector (sector 0) on the volume or disk. The boot sector contains specific information about the rest of organization of the file system, including how many copies of the FAT tables are present, how big a sector is, how many sectors in a cluster, etc. FAT tables contain pointers to every cluster on the disk, and indicate the number of the next cluster in the currentcluster chain, the end of the cluster chain, whether a cluster is empty, or has errors. The FAT tables are the only method of finding the location of files and directories on the rest of the disk. There are typically two redundant copies of the FAT table on disk for data security and recovery purposes. On a floppy, since a cluster consists of just one sector, there is a FAT entry pointer to everysector on the disk. The root directory is the primary directory of the disk. Unlike other directories located in the data area of the disk, the root directory has a finite size (For FAT12, 14 sectors * 16 directory

1

The figure has been obtained from the CS324 course web-site from Brigham Young University.

CSSE 332 – Operating Systems Spring 2004-2005

Rose-Hulman Institute of TechnologyComputer Science and Software Engineering Prof. Archana Chidanandan



entries per sector = 224 possible entries), restricting the total amount of files or directories that can be created therein. Data Area. - The first sector or cluster of the data area corresponds to cluster 2 of the file system (the first cluster is always cluster 2). The data area contains file and directory data andspans the remaining sectors on the disk.

A summary of the disk organization is given below: Logical Sector 0 1 10 19 XX XX + 1 Boot Sector First sector in the (first) FAT First sector in the second FAT First sector in the floppy disk's root directory Last sector in the root directory (see bytes 17 and 18 in the boot sector) Beginning of data area for the floppy disk Content

For FAT12, XX = 32 as14 sectors are reserved for the root directory. 2. The Boot Sector The boot sector exists at sector 0 on the disk and contains the basic disk geometry, which is the set of information needed by the operating system to use the disk correctly. Whenever the disk is used, the information from the boot sector is read and any needed information is extracted from it. The boot sector on a DOS formattedfloppy is a sequence of bytes that looks as follows: Starting byte Length (in bytes) Stored data 0 11 13 14 16 17 19 21 11 2 1 2 1 2 2 1 Ignore Bytes per sector Sectors per cluster Number of reserved sectors Number of FATs Maximum number of root directory entries Total sector count a Ignore

CSSE 332 – Operating Systems Spring 2004-2005

Rose-Hulman Institute of Technology Computer Science...
Leer documento completo

Regístrate para leer el documento completo.

Estos documentos también te pueden resultar útiles

  • gfdg
  • gfdg
  • gfdg
  • gfdg
  • gfdg
  • gfdg
  • gfdg
  • gfdg

Conviértase en miembro formal de Buenas Tareas

INSCRÍBETE - ES GRATIS