1 / 22

2/17 How Disk Storage Works

2/17 How Disk Storage Works. Roll call. Video: disk storage. Step-by-step lecture. 1. Formatting a disk: Why bother?. Formatting provides a “street map” for the data to be laid out on. Where’s that data?. Image courtesy of Mapquest.com. 1A. Formatting a disk.

Download Presentation

2/17 How Disk Storage Works

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. 2/17 How Disk Storage Works • Roll call. • Video: disk storage. • Step-by-step lecture.

  2. 1. Formatting a disk: Why bother? • Formatting provides a “street map” for the data to be laid out on. • Where’s that data? Image courtesy of Mapquest.com

  3. 1A. Formatting a disk • A grid of wedges and tracks, made with magnetic “signposts”is laid out across the disk.

  4. 1B. Formatting a disk: wedges • Wedges are wedge-shaped areas on a disk. • Divided radially.

  5. 1C. Formatting a disk: tracks • Tracks are ring-shaped sections of the disk.

  6. 1D. Formatting a disk • The read/write heads check these signposts as it reads the disk to know where it is.

  7. 2. Sectors • The junction of a wedge and a track is called a sector. • Sectors can be thought of as city blocks: the 3600 block of Lindell Boulevard -- 1 sector, 1 block.

  8. 2A. Sectors make up clusters • A cluster is two or moresectors. • A cluster is the smallest unit of storage for the disk.

  9. 2B. How many sectors to a cluster? • EX: a file needs 8K of space. Each sector is 12K big. • How much disk space will the file take up? ANS: 24K (2 sectors is the minimum space)

  10. 2C. Operating systems differ • Different operating systems divide up the disk in different portions. • Some are more efficient than others.

  11. 3. The FAT and the VFAT • A directory file -- File Allocation Table is created in sector 0 of the disk. • DOS: FAT • Win95: VFAT -- Virtual File Allocation Table

  12. 3A. Differences: FAT and VFAT name length bits read FAT <=11 char. 16 bits VFAT <=255 32 VFAT is faster at accessing data than FAT.

  13. RAM HARD DRIVE 4. Writing a file to a disk • The program is holding the file in the RAM. • When you click “Save”, it asks the CPU to move the file from RAM to a disk.

  14. 5. First, list it in the VFAT • The operating system changes the VFAT to list where the file will be stored in the folders in the directory.

  15. 6. Second, find a spot for the file • The VFAT also tells the operating system where an available cluster is on the disk. • The cluster address lists the track and sectors that make up the cluster.

  16. 7. The VFAT to the OS to the BIOS • The VFAT tells the OS what the address is of the cluster. • The OS hands off the info to the BIOS.

  17. 8. The BIOS sends the file • The BIOS grabs the file out of the RAM. It tells the disk controller to save the file, starting at the beginning point of the cluster.”

  18. 9. Oops! The file’s too big • If the file is bigger than the cluster, the VFAT tells the OS where another available cluster is. • The BIOS continues sending the file, but now directed to the next cluster.

  19. 9A. Oops! The file’s too big • The VFAT keeps track of the chain of clusters that the file uses.

  20. 10. File’s done! • An end of file marker tells the BIOS and VFAT that the transfer is complete.

  21. 11. Update the VFAT • The file’s record in the VFAT is updated with the various clusters that make up the file.

  22. On 2/19: • Reading a file from a disk • How a hard drive works • 2nd individual assignment discussion

More Related