350 likes | 497 Views
Computer Maintenance. Hard Drives. What is a Hard Drive?.
E N D
Computer Maintenance Hard Drives
What is a Hard Drive? • The hard disk drive (HDD) is a high-volume, disk-storage device with fixed, high-density, rigid media composed of relatively inflexible aluminum, glass platters, or disks. This inflexibility led to the name hard disk drive. In the past, the hard drive was typically not removable, which is why IBM has referred to hard drives as fixed disk drives. IT: Computer Maintenance - Hard Drives
Hard Disk Basics Hard disks were invented in the 1950s. They started as large disks, up to 20 inches in diameter, holding just a few megabytes. They were originally called "fixed disks" or "Winchesters" (a code name used for a popular IBM product). They later became known as "hard disks" to distinguish them from "floppy disks." Hard disks have a hard platter that holds the magnetic medium, as opposed to the flexible plastic film found in tapes and floppies. At the simplest level, a hard disk is not that different from a cassette tape. Both hard disks and cassette tapes use the same magnetic recording techniques. Hard disks and cassette tapes also share the major benefits of magnetic storage – the magnetic medium can be easily erased and rewritten, and it will "remember" the magnetic flux patterns stored onto the medium for many years. IT: Computer Maintenance - Hard Drives
Hard Disk Basics • The hard-disk platter is then polished to mirror-like smoothness. • On a hard disk, you can move to any point on the surface of the disk almost instantly. • In a hard disk, the read/write head "flies" over the disk, never actually touching it. • A hard-disk platter can spin underneath its head at speeds up to 3,000 inches per second; that’s about 170 mph or 272 kph! • The information on a hard disk is stored in extremely small magnetic domains. The size of these domains is made possible by the precision of the platter and the speed of the medium. IT: Computer Maintenance - Hard Drives
Hard Disk Basics • A modern desktop machine will have a hard disk with a capacity between 20 and 80 gigabytes. Data is stored on the disk in the form of files. • A file is simply a named collection of bytes. The bytes might be the ASCII codes for the characters of a text file, the instructions from a software application for the computer to execute, the records of a data base, or the pixel colors for a GIF image. • No matter what it contains, however, a file is simply a string of bytes. When a program running on the computer requests a file, the hard disk retrieves its bytes and sends them to the CPU one at a time. IT: Computer Maintenance - Hard Drives
Hard Disk Basics • There are two ways to measure the performance of a hard disk: • Data rate– The data rate is the number of bytes per second that the drive can deliver to the CPU. Rates between 5 and 40 megabytes per second are common. • Seek time– The seek time is the amount of time between when the CPU requests a file and when the first byte of the file is sent to the CPU. Times between 10 and 20 milliseconds are common. IT: Computer Maintenance - Hard Drives
Inside a Hard Disk It is a sealed aluminum box with controller electronics attached to one side. The electronics • control the read/write mechanism and the motor that spins the platters • assemble the magnetic domains on the drive into bytes (reading) and turn bytes into magnetic domains (writing) • are all contained on a small board that detaches from the rest of the drive IT: Computer Maintenance - Hard Drives
Inside a Hard Disk Underneath the board are the connections for the motor that spins the platters, as well as a highly-filtered vent hole that allows internal and external air pressures to equalize. IT: Computer Maintenance - Hard Drives
Inside a Hard Disk • The platters, which typically spin at 5,400 or 7,200 rpm when the drive is operating, are manufactured to amazing tolerances, and are mirror-smooth. • The arm that holds the read/write heads is controlled by the mechanism in the upper-left corner, and is able to move the heads from the hub to the edge of the drive. • its movement mechanism is extremely light and fast • on a typical hard-disk drive, it can move from hub to edge and back up to 50 times per second IT: Computer Maintenance - Hard Drives
Inside a Hard Disk • In order to increase the amount of information the drive can store, most hard disks have multiple platters. This drive has three platters and six read/write heads. IT: Computer Maintenance - Hard Drives
Inside a Hard Disk • The mechanism that moves the arms on a hard disk has to be incredibly fast and precise. It can be constructed using a high-speed linear motor. IT: Computer Maintenance - Hard Drives
Inside a Hard Disk • Many drives use a "voice coil" approach -- the same technique used to move the cone of a speaker on your stereo is used to move the arm. IT: Computer Maintenance - Hard Drives
Storing the Data • Data is stored on the surface of a platter in sectors and tracks. Tracks are concentric circles, and sectors are pie-shaped wedges on a track. • A typical track is shown in yellow; a typical sector is shown in blue. A sector contains a fixed number of bytes -- for example, 256 or 512. • Either at the drive or the operating system level, sectors are often grouped together into clusters. IT: Computer Maintenance - Hard Drives
Storing the Data • The process of low-level formatting a drive establishes the tracks and sectors on the platter. The starting and ending points of each sector are written onto the platter. This process prepares the drive to hold blocks of bytes. • High-level formatting then writes the file-storage structures, like the file-allocation table, into the sectors. This process prepares the drive to hold files. IT: Computer Maintenance - Hard Drives
Tracks, Cylinders, and Sectors The tracks are numbered, starting from zero, starting at the outside of the platter and increasing as you go in. A modern hard disk has tens of thousands of tracks on each platter. Data is accessed by moving the heads from the inner to the outer part of the disk, driven by the head actuator. This organization of data allows for easy access to any part of the disk, which is why disks are called random access storage devices. IT: Computer Maintenance - Hard Drives
Tracks, Cylinders, and Sectors Each track can hold many thousands of bytes of data. It would be wasteful to make a track the smallest unit of storage on the disk, since this would mean that small files would waste a large amount of space. Therefore, each track is broken into smaller units called sectors. Each sector holds 512 bytes of user data, plus as many as a few dozen additional bytes used for internal drive control, and for error detection and correction. The first PC hard disks typically held 17 sectors per track. Today's hard disks can have thousands of sectors in a single track, and make use of zoned recording to allow more sectors on the larger outer tracks of the disk. IT: Computer Maintenance - Hard Drives
The Difference Between Tracks and Cylinders A hard disk is usually made up of multiple platters, each of which uses two heads to record and read data: one for the top of the platter and one for the bottom. The heads that access the platters are locked together on an assembly of head arms. This means that all the heads move in and out together, so each head is always physically located at the same track number. It is not possible to have one head at track 0 and another at track 1,000. IT: Computer Maintenance - Hard Drives
The Difference Between Tracks and Cylinders Because of this arrangement, the track location of the heads is not often referred to as a track number but as a cylinder number. A cylinder is basically the set of the tracks at which all the heads are currently located. So if a disk had four platters, it would (normally) have eight heads, and cylinder number 720 (for example) would be made up of the set of eight tracks (one per platter surface) at track number 720. The name comes from the fact that if you mentally visualize these tracks, they form a skeletal cylinder because they are equal-sized circles stacked one on top of the other in space. IT: Computer Maintenance - Hard Drives
The Difference Between Tracks and Cylinders IT: Computer Maintenance - Hard Drives
Interleaving A common operation when working with a hard disk is reading or writing a number of sectors of information in sequence. After all, a sector only contains 512 bytes of user data, and most files are much larger than that. Let's assume that the sectors on each track are numbered consecutively, and say that we want to read the first 10 sectors of a given track on the hard disk. Under ideal conditions, the controller would read the first sector, then immediately read the second, and so on, until all 10 sectors had been read. Just like reading the first 10 words in this sentence in a row. IT: Computer Maintenance - Hard Drives
Interleaving However, the physical sectors on a track are adjacent to each other and not separated by very much space. Reading sectors consecutively requires a certain amount of speed from the hard disk controller. The platters never stop spinning, and as soon as the controller is done reading all of sector #1, it has little time before the start of sector #2 is under the head. Many older controllers used with early hard disks did not have sufficient processing capacity to be able to do this. They would not be ready to read the second sector of the track until after the start of the second physical sector had already spun past the head, at which point it would be too late. IT: Computer Maintenance - Hard Drives
Interleaving If the controller is slow in this manner, and no compensation is made for the controller, it must wait for almost an entire revolution of the platters before the start of sector #2 comes around and it can read it. Then, of course, when it tries to read sector #3, the same thing would happen, and another complete rotation would be required. All of this waiting around would kill performance: if a disk had 17 sectors per track, it would take 17 times as long to read those 10 sectors as it should have in the ideal case! IT: Computer Maintenance - Hard Drives
Interleaving To address this problem, older controllers employed a function called interleaving, allowing the setting of a disk parameter called the interleave factor. When interleaving is used, the sectors on a track are logically re-numbered so that they do not correspond to the physical sequence on the disk. The goal of this technique is to arrange the sectors so that their position on the track matches the speed of the controller, to avoid the need for extra "rotations.” Interleave is expressed as a ratio, "N:1", where "N" represents how far away the second logical sector is from the first, how far the third is from the second, and so on. IT: Computer Maintenance - Hard Drives
Interleaving An example is the easiest way to demonstrate this method. The standard for older hard disks was 17 sectors per track. Using an interleave factor of 1:1, the sectors would be numbered 1, 2, 3, .. , 17, and the problem described above with the controller not being ready in time to read sector #2 would often occur for sequential reads. IT: Computer Maintenance - Hard Drives
Interleaving Instead, an interleave factor of 2:1 could be used. With this arrangement, the sectors on a 17-sector track would be numbered as follows: 1, 10, 2, 11, 3, 12, 4, 13, 5, 14, 6, 15, 7, 16, 8, 17, 9. Using this interleave factor means that while sector 1 is being processed, sector 10 is passing under the read head, and so when the controller is ready, sector 2 is just arriving at the head. To read the entire track, two revolutions of the platters are required. This is twice as long as the ideal case (1:1 interleaving with a controller fast enough to handle it) but it is almost 90% better than what would result from using 1:1 interleaving with a controller that is too slow (which would mean 17 rotations were required). IT: Computer Maintenance - Hard Drives
Interleaving What if the controller was too slow for a 2:1 interleave? It might only be fast enough to read every third physical sector in sequence. If so, an interleave of 3:1 could be used, with the sectors numbered as follows: 1, 7, 13, 2, 8, 14, 3, 9, 15, 4, 10, 16, 5, 11, 17, 6, 12. Again here, this would reduce performance compared to 2:1, if the controller was fast enough for 2:1, but it would greatly improve performance if the controller couldn't handle 2:1. IT: Computer Maintenance - Hard Drives
Interleaving So this begs the question then: how do you know what interleave factor to use? Well, on older hard disks, the interleave factor was one parameter that had to be tinkered with to maximize performance. Setting it too conservatively caused the drive to not live up to its maximum potential, but setting it too aggressively could result in severe performance hits due to extra revolutions being needed. The perfect interleave setting depended on the speeds of the hard disk, the controller, and the system. Special utilities were written to allow the analysis of the hard disk and controller, and would help determine the optimal interleave setting. The interleave setting would be used when the drive was low-level formatted, to set up the sector locations for each track. IT: Computer Maintenance - Hard Drives
Interleaving On modern disk drives, the interleave setting is always 1:1. Controller too slow? Today's controllers are so fast, much of the time they sit around waiting for the platters. How did this situation come to change so drastically in 15 years? Well, it's pretty simple. The spindle speed of a hard disk has increased from 3,600 RPM on the first hard disks, to today's standards of 5,400 to 10,000 RPM. An increase in speed of 50% to 177%. The faster spindle speed means that much less time is needed for the controller to be ready before the next physical sector comes under the head. IT: Computer Maintenance - Hard Drives
Interleaving However, look at what processing power has done in the same time frame: CPUs have gone from 4.77 MHz speeds to the environs of 1 GHz; an increase of over 20,000%! The speed of other chips in the PC and its peripherals have similarly become faster by many multiples. As a result of this increase in speed in modern circuits, controller speed is no longer an issue for current drives. There is in fact no way to set the interleave for a modern drive; it is fixed at 1:1 and no other setting would be necessary. Understanding interleaving is still important because the concept forms the basis for more advanced techniques such as head and cylinder skew, which are used on modern drives. IT: Computer Maintenance - Hard Drives
Maintaining Your Hard Drive • To maintain your hard drive, you should know how to • remove unnecessary files and clutter • check the integrity of your hard drive • defrag your hard drive IT: Computer Maintenance - Hard Drives
Removing Unnecessary Files Every time you run a program, install, uninstall, or go on the web, junk files get left behind. It is good to remove these junk files. In the System Tools of your computer is a utility called Disk Cleanup. • Disk Cleanup will search your hard drive and remove the files you no longer need. • There are other programs that can also perform a more thorough cleanup of your drive. IT: Computer Maintenance - Hard Drives
Check the integrity of your hard drive The Windows Operating System includes a utility called Scan Disk. Scan Disk is located in the System Tools folder with the Disk Cleanup utility. Scan Disk will check the hard drive for errors in the file system and attempt to fix anything it finds. It can also check for defects on the platters themselves. Scan Disk should be run before defragging. IT: Computer Maintenance - Hard Drives
Defragging A Hard Drive As you use your computer, some files can become fragmented, meaning that part of a file may be stored in one location, and the rest of it in another. In order for your computer to read the file, it will need to go to both locations, resulting in slowed performance. It makes sense that if the computer only had to look in one location to get an entire file, it would perform faster. Defragging a hard drive will accomplish this. IT: Computer Maintenance - Hard Drives
Fragmented vs. Defragmented IT: Computer Maintenance - Hard Drives
Reference • www.howstuffworks.com IT: Computer Maintenance - Hard Drives