En homage to Jody and those on the Math field trip (it's raining here in Naperdale today, so I hope you're dry), please enjoy the encapsulation of my Chapter 14 lecture notes, given May 16, 2002.
Chapter 14 is titled "Mass Storage Structure". Most of the chapter deals with hard disks used as secondary storage in a computer system and their interaction with the operating system. There is also a final section on tertiary storage: backup devices like CD-ROMs, tapes, floppy drives, etc.
As the chapter relates to the operation of disk drives, you can page back to section 2.3 of our text to refresh your memory on these devices. The picture on page 37 of a disk drive is helpful.
Conceptually the disk is a 1-D array of blocks...
2 fundamental disk types:
Revisit old definitions for disk drives:
Our scheduling algorithms will consider only seek time. The goal of our disk scheduling algorithms will be to minimize the seek time for a sequence of disk operations.
So, the input data for these scheduling algorithms will be a sequence of disk operations listed by the cylinder number at which the operation must be performed. For example, the sequence:
52, 131, 82
means that a block of data is needed on cylinders 52, 131, and 82. Selecting the order of these accesses will be the job of our disk scheduling algorithms.
Scheduling algorithms:
We did an example in class using each algorithm. There is a nice example given in the text.
Low-level formatting - disks are formatted into 512 byte sectors, right at the factory
These sectors may have accounting information located in the head or tail of the sector. The accounting information, used by the disk, can include support for Error Correcting Code (ECC) so that minor 1-2 bit errors can be detected and fixed automatically.
For the OS to actually use the disk it needs to:
A boot disk will contain a boot block that can be loaded at system startup by the boot ROM and initialize your operating system. Not all disks contain a boot block.
Handling disk errors, or "bad blocks" is important. "Bad blocks" are bound to happen, but we don't want problems in a tiny fraction of the disk to make the disk unusable:
If a block on the disk goes bad after data has been stored on it, then manual intervention is required (because your data is probably lost).
Swap space (used for virtual memory) on a disk is a special case and frequently is not setup with the normal file structures. This is called a raw partition. Swap space doesn't require the functionality of a normal file system, and therefore can be sped up by removing the file system overhead. The Solaris2 OS provides you with the option to choose.
RAID = Redundant Array of Independent (or Inexpensive) Disks
Use redundant storage of data on multiple disks to reduce the probability of losing data.
Mirroring - copy each piece of data on two or more disks
Example: If the mean time to failure of a single disk is 100,000 hours (roughly 4,000 days, 10+ years), that's great. However, if our total system includes 100 of these disks, then the mean time to failure of any disk on the system is now 4,000 days / 100, or 40 days. We can significantly reduce this time by storing data on multiple disks, in which case, data is lost only when 2 or more independent disks fail (nearly) simultaneously.
The notion of truly "independent" disks is a bit unrealistic. Disks within some proximity of each other may be subject to the same power failures or act of nature.
Bit striping is a special kind of RAID application used to increase parallelism and, therefore, performance. Bit striping stores each bit of a byte or word on a separate disk. For example, you could use 8 disks and 1 bit of each byte would be stored on each disk. This improved the speed of disk access roughly 8x.
NOTE: We skipped sections 14.5.3 and 14.5.4 that deal with "RAID Levels", and you will not be responsible for this material.
Disks can be connected to a computer system via:
Used for backup of secondary storage
Must be cheap and removable
Examples: CD-ROM, tapes, floppy drive
Removable disk are also possible. The trick is that the disk head not be close to the disk so that disk head crashes happen when the disk is moved. Some solutions include:
The application and user interface to tertiary storage is either setup to mimic the file system or in a special format that will require special software for inspection and use.
Finally, in class, Prof Bill used the historical price charts on pages 524 and 525 to reminisce. The class sighed and rolled their collective eyes as Bill blathered about PC's in 1982 ("back in the day") that had only 16 KB or RAM and 10 MB of disk space ("and we were happy to have that"). So, we calculated that using the same rate of growth over the next 20 years, in 2022, Ahmad will purchase a computer at www.dell.com that has nearly 200 TB (trillion bytes) of disk space... all affordable on a student's allowance, of course.
Thanks... yow, bill