Quiz Review

Chapter 10 – Mass Storage Structure

10.1.1 Magnetic Disks

  • They are divided into tracks, and sectors.
  • A group of tracks all the same distance from the center is a cylinder.
  • They have a seek time, which is how long it takes to get the disk head to the right place, plus wait for the platter to rotate to the right place.
  • Access time ~1/100 of a second
  • Bandwidth hundreds of megabytes / second

10.1.2 SSD

  • They don’t have seek times related to location
  • Seek times very fast. Bandwidth about like hard drives about.
  • They can wear out with too many writes, but it’s almost always OK.

10.1.3 Magnetic Tapes

  • Pthhh

10.2 Disk Structure

  • They can be constant linear velocity or constant angular velocity
  • Disks can be addressed as an array of blocks, numbered 1,2,3,4, and the disk will translate into the track/sector things.

10.3 Disk Attachment

  • Ptttttt

10.4 Disk Scheduling

  • This only applies to spinning metal disks, and not SSDs.
  • First Come First Serve

◦Cannot starve

◦Fair

  • Shortest Seek Time Next

◦Can starve

◦Great performance

  • Look (like SCAN)

◦Disk head has both a location and a direction

◦Works like an elevator

◦No starve

◦Performance OK

  • C-Look (like C-SCAN)

◦Go to the end. The answer requests as you go to the other end. Repeat.

◦No starve

◦Performance OK-ish

10.5.1 Disk Formatting

◦The manufacturer low-level formats, the user high level formats.

◦Low level is write sector locations and checksums

◦High level is make directories and stuff

10.5.2 Boot Block

  • The first block is special and cannot be used for data.

10.5.3 Bad Blocks

  • The drive might have a few bad blocks. They get work around.

10.6 Swap Space Management

  • ptttthhhh

10.7 RAID

  • RAID 0 is striping
  • RAID 1 is mirroring
  • RAID 5 is that thing with the parity bit
  • They each have a ‘sledge hammer factor” , a capacity, a write speed, and a read speed.
  • RAID 0+1 and 1+0 are a thing, but not a focus of the class.

10.8 Stable Storage Implementation

  • When writing to a disk block, you will either get OLD data, NEW data, or ERROR. You will never get a mix of old and new data.
  • By using two blocks that are copies, and writing first one and then the other, you can guarantee that you either get OLD data or NEW data, but not an error. (Unless someone pours maple syrup on your computer, or a hard drive crashes).

Chapter 11 File System Interface

11.1.1 File Attributes

  • Files have metadata, like name, date, type, size, etc.

11.1.2

  • Files have standard operations like read, write, create, truncate, seek, delete.
  • When a file is opened, we associate several items with each opened file descriptor

◦location within the file

◦access rights

◦location on the disk

◦locks

◦more

11.1.3 File Types

  • Files have a type

◦execuatble, html, bag-of-bytes, etc.

◦often we record the type via the extension

▪which is not great

▪but it works

That’s as far as the quiz is