Download
hard drives continued n.
Skip this Video
Loading SlideShow in 5 Seconds..
Hard Drives Continued PowerPoint Presentation
Download Presentation
Hard Drives Continued

Hard Drives Continued

1 Views Download Presentation
Download Presentation

Hard Drives Continued

- - - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript

  1. Hard Drives Continued

  2. Latency and Spindle Speed • The time it must wait for the correct sector to swing by clearly depends on how fast the disks are rotating – the spindle speed. • If the spindles rotates at 10,000 RPM (revolutions per minute), then it rotates at speed of 10,000/60 = 166.7 revolutions per second. • If there are 166.7 revolutions per second, then a revolution takes 1/166.7 seconds = 0.006 s or 6 ms. • The average latency is half of the rotation time or in this case 3 ms.

  3. PCGuide table

  4. Ordering the to-do list • Because the hard drive is slower than the processor and memory, there may be a back up of tasks for it to perform. The order in which it performs these tasks can greatly affect its efficiency. • One ordering is a simple FIFO (first-in, first-out) ordering. The tasks (reads and writes) are queued up and the first task requested is the first task performed.

  5. More Sophisticated Orderings • Seek-Time Optimization (a.k.a. Elevator seeking): • Seek time involves the radial positioning of the head. The tasks are ordered based on their radial positioning to minimize seek time. • Access-Time Optimization (a.k.a. multiple command reordering): • Takes into account both radial and angular positioning to minimize access time which includes seek time and latency.

  6. Ordering Comparison

  7. Locating data • The platters are dense with data, if the head is even the slightest bit off target, one will be reading the wrong data. • The actuator uses a voice coil. The voice coil uses a feedback mechanism to locate the data. • Feedback means taking some output and putting it back in as input. In this case the head is reading information from the platter. Some of that information is telling the head where it is on the platter.

  8. Servo Information • The information on the disk about location on the disk is called servo information. • It is not user’s data but data about the disk’s operation. • The servo information can be placed • In dedicated sectors (wedge servo) • On dedicated platter side (dedicated servo) • Spread throughout (embedded servo)

  9. Low-level format • Low-level formatting (LLF), a.k.a. physical formatting, establishes the tracks, sectors, etc. and writes the servo information. • For a hard drive, this is done once by the manufacturer. • For a floppy disk, this can be done by the user. • Any previous data is lost when a low-level format is performed on a disk.

  10. Our old enemy heat • When objects heat up, they tend to expand (thermal expansion). • If the heat in a hard drive is not distributed uniformly, then different platters are at different temperatures and thus have expanded different amounts. • This is why dedicated servo is not as good as embedded servo.

  11. Thermal recalibration • Every once in awhile the hard disk reads itself just to check on track positioning and so forth. • You may hear the hard drive spinning even though the PC is neither reading it nor writing to it. • This is called thermal recalibration. • The amount of thermal calibration necessary was reduced by manufacturers moving to embedded servo techniques.

  12. A gentle breeze • While reading or writing the platters spin, which causes a breeze. The actuator arm is designed like a wing that floats in this breeze. • When the drive spins down (stops spinning), the breeze stops blowing and the actuator arm must come in for a landing. It comes in contact with the platter. • We do not want there to be any data written in the region where the arm lands.

  13. The landing zone is for … • There are special regions on the disk called landing zones where no data is written and where the head comes to rest when the drive spins down. • Positioning the head into the landing zone is called head parking. • There is a BIOS parameter that informs the system where the landing zones are. But in modern drives the drive is designed to return automatically to the landing zone (even if the power is lost). • Some drives are designed so that the head never lands.

  14. Landing Zone Setting in BIOS

  15. Spindle Speed Revisited • In addition to accurately positioning the head, the platter must spin at a very accurate speed. • The standard spindle speed for a long time was 3600 RPM (revolutions per minutes), which corresponds to 60 cycles per second or 60 Hz, which is same frequency as the AC power that comes out of a standard US wall socket. • But since latency is connected to spindle speed, the spindle speeds have been raised. • The higher speeds tend to debut with SCSI drives and then filter down to ATA/IDE drives.

  16. Spindle speed and drive type Source: PCGuide.com

  17. Spindle Speed Issues • Smaller platters are easier to spin faster • Think of an ice skater spinning • Platters must spin together, so it is easier to spin fewer platters. • The platter must spin at a steady speed and not vibrate (we don’t want a head crash). • Heat and power: spinning faster requires more power and generates more heat.

  18. Power Issue • Because of momentum (objects in motion tend to remain in motion), it takes more power to start the drive spinning than to keep it spinning. • This is one place where the 12V connection is used • “Power management” reduces the power when a device is not being used. But spinning up a hard drive requires more power than maintaining the rotation, so continually starting and stopping could cost power. • Also the starting and stopping could be detrimental to the drive.

  19. Power Issue (Cont.) • When a computer has multiple drives, e.g. a master/slave set up, the slave may delay its spin up until the master has completed its spin up so they are not pulling on the power simultaneously. • One may have to use a particular jumper setting to ensure this delay.

  20. Cover and Base Casting Don’t open the case (unless your room is clean). The screws in the case are unusual to prevent you from opening it.

  21. Yes to Air / No to Dust • The hard drive cannot be completely sealed off, it needs air to keep it from overheating. • On the other hand, the slightest spec of dust can cause a head crash. • A hard drive needs an air filtration and circulation system. • The circulation occurs naturally in that the spinning disks cause the air to flow. • There is a filter to keep dirt out. It does not need changing.

  22. Heat Issues Revisited • Recall that moving air (convection) is the primary mechanism for cooling computer devices and that the spinning platters get the air moving inside hard drives. • Thus typical hard drives (ATA/IDE and SCSI with moderate spindle speeds) can use passive cooling. • High speed SCSI drives may need active cooling (i.e. fans).

  23. Drive cooler

  24. Bay cooler

  25. Retail vs. OEM • Retail • Hard Disk Drive, Installation Instructions, Drivers and/or Overlay Software, Mounting Hardware, Interface Cable, Warranty Card • OEM (original equipment manufacturer) • Hard Disk Drives and Jumpers (maybe)

  26. Geometry Review • A platter is divided into concentric circles called tracks. • The tracks are further divided into arcs called sectors. • A sector holds 512 bytes of data. • There may be additional bytes for servo information. • There may be additional bytes for error detection and correction. • In zoned bit recording (ZBR) outer tracks have more sectors than inner tracks.

  27. Data transfer rate is track dependent • The spindle rotates at a specified angular speed (e.g. 7200 RPM). • The data transfer rate depends on this speed. • But since there are more sectors and thus more data at larger radii, the data transfer rate can be track dependent.

  28. Zone Dependent Data Transfer Rate

  29. Interleaving • When storing a file larger than a sector, it is sometimes faster to store it on non-consecutive sectors • In one-to-one interleaving, the sectors are placed consecutively around a track. • In two-to-one interleaving, every other sector is written to • …

  30. Interleaving (cont.)

  31. Interleaving (cont.) • The purpose of interleaving is to make the disk drive more efficient. The disk drive can access only one sector at a time, and the disk is constantly spinning beneath the head. • This means that by the time the drive is ready to access the next sector, the disk may have already spun beyond it. • It depends how fast the controller is. Modern controllers are very fast and 1-to-1 interleaving is the norm.

  32. What’s the delay? • Modern controllers are so fast there is effectively no delay between writing one sector and the next and thus interleaving is not necessary. • But if writing requires switching to a different platter (same cylinder) there is a small delay. • And if the writing requires placing data on more than one track/cylinder, there is a more substantial delay in repositioning the head so as to write to the next track.

  33. Cylinder and Head Skew • The sector numbering is staggered to account for delay. • There is staggering from platter to platter within the cylinder. This is known as head skew. • There is staggering from track to track on a given platter. This is known as cylinder skew.

  34. Cylinder and Head Skewing Staggering on a given platter (cylinder skew) and staggering from platter-to-platter (head skew).

  35. Three-Step Process to Use Hard Disk • To prepare a hard disk for use, there are three steps: • Low-level (or physical) formatting • Partitioning • High-level (or logical) formatting

  36. Low-Level Formatting • For hard drives, low-level formatting is done by the manufacturer. • It establishes the tracks, sectors and so on. • It writes the servo information onto the disk. • Any information on a disk is lost if it is low-level formatted. • There are pseudo-low-level formatting utilities that one can run which effectively write 0’s to all of the sectors and replace bad sectors with spares. • This is distinct from true low-level formatting which establishes the sectors.

  37. Partitioning • Partitioning separates the disk into logical pieces. • The standard motivations for partitioning are: • To have multiple operating systems on the same disk (e.g. a “dual boot system”) • To improve disk efficiency, to minimize “slack” and so on. • To separate system files from user files (from virtual memory).

  38. Drive Letters and Partitions • Drive letters A and B are reserved for floppies. (It was standard for early PCs to have two floppy disk drives.) • The computer begins assigning hard drive partitions drive letters starting with C. • All primary drives are assigned letters first. • Next letters are assigned to logical volumes within the extended partition.

  39. Partitions • A drive must have at least one partition. • A drive can have at most four partitions. • These are known as the primary partitions. • One can achieve the effect of having more than four partitions on one hard drive by designating one as an extended partition (instead of a primary partition). The extended partition can then be divided into logical partitions or logical volumes.

  40. Primary versus Logical • “Boot-ability”: A primary partition is bootable and can be set as the active partition. • Typical schemes reserve primary partitions to act as potential active partitions. That is, if the space is to be used for non-operating-system files, the space will be set up as a logical volume instead of a primary partition. • Drive Letter Assignment: All primary partitions are assigned drives before any logical partition is assigned a drive letter. • Adding (not replacing) a hard drive can result in a reordering of one’s drives if one has logical partitions.

  41. Parts of a Primary Partition • A primary partition will contain some combination of the following three things: • System partition: the files need to start the operating system • Boot partition: the operating system files • General purpose partition: any other files (programs and data)

  42. Master Boot Record • The first thing read from the hard drive when a computer starts is the Master Boot record (MBR). • It is located at cylinder 0, head 0, and sector 1. • The MBR consists of: • Master Partition Table • This table is limited in size and only has information about the primary partitions (not any logical volumes) and which primary partition is active • Master Boot Code • A small program to start the boot process

  43. Volume Boot Sector • Each partition has a volume boot sector (or partition boot sector) which contains information about: • The size of the partition • Volume Boot Code: • The Master Boot Code calls the Volume Boot Code of the active partition. The Volume Boot Code starts loading the operating system. • Location of the File Allocation Table (FAT)

  44. Boot sector virus • The master boot code and the volume boot code are the first software code executed after the BIOS (firmware) has started the computer when it is powered up. • This very low-lying code is susceptible to viruses known as boot sector infectors. • Why you should not have a floppy in the drive when you boot (unless you mean to boot from the floppy).

  45. High-level formatting • After one partitions a disk, the next level of preparing it to be used is to high-level (or logical) formatting. • Logical formatting provides • Partition boot sector • System ID byte (identifies partition) • Information for the filesystem • Data on bad sectors

  46. Filesystem • The filesystem indicates how the data is organized within the drive. • Physically the drive is organized into platters, tracks and sectors. But at the high level data is organized into files. • The filesystem handles this correspondence between the physical location of data on the disk and its logical separation into files.

  47. File Allocation Table • One of the main features of the filesystem is the file allocation table (FAT). • The FAT is a table used to store the location of files. Sometimes a file cannot be stored entirely in consecutive locations. Then the operating system stores the information about all of the parts of the file and how they are arranged in the FAT.

  48. Fragmentation • When the files are broken into pieces, it is known as fragmentation. • There is a defragmentation utility that rearranges the data stored on a disk to minimize the amount of fragmentation. • Because reading contiguous data is faster, defragmenting can help with performance.

  49. Go to My Computer, right click on a drive, choose Properties