Студопедия

Главная страница Случайная страница

Разделы сайта

АвтомобилиАстрономияБиологияГеографияДом и садДругие языкиДругоеИнформатикаИсторияКультураЛитератураЛогикаМатематикаМедицинаМеталлургияМеханикаОбразованиеОхрана трудаПедагогикаПолитикаПравоПсихологияРелигияРиторикаСоциологияСпортСтроительствоТехнологияТуризмФизикаФилософияФинансыХимияЧерчениеЭкологияЭкономикаЭлектроника






Hard Disks






Nearly every desktop computer and server in use today contains one or more hard-disk drives. Every mainframe and supercomputer is normally connected to hundreds of them. These billions of hard disks do one thing well - they store changing digital information in a relatively permanent form. They give computers the ability to remember things when the power goes out.

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.

 

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.

The other important parameter is the capacity of the drive, which is the number of bytes it can hold.

Data is stored onto the disk in the form of files. A file is simply a named collection of bytes. 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.

Data is stored on the surface of a platter in tracks. Tracks are concentric circles, and sectors are pie-shaped wedges on a track.

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.

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.

The read/write heads do not touch the platters in the drive. When the platters spin up, they rotate at anywhere between 3, 600 rpm and 7, 200 rpm.

To the head, the platter seems to be moving at about 150 mph, and a very thin cushion of air forms between the head and the platter so that the head " flies" over the platter. If even the smallest bit of dust makes its way onto the platter, the flight is disrupted and the head " crashes" into the platter, scratching it. The crash, of course, sprays a lot more dust and debris onto the platter and then it's all over.

The other thing that can cause a squealing sound is the bearings in the drive motor. That is another common way for a drive to fail.

Hard disks are amazingly reliable these days, with " Mean Time Between Failures" (MTBF) of 500, 000 to 1, 000, 000 hours. That means that, on average, a drive fails after the specified number of hours, with half of the drives lasting more than that and half lasting less. 500, 000 hours is about 57 years. Clearly, not all drives last 57 years, so frequent backups are important.

Hard disks are electromechanical devices and their working life is finite. Media faults, mechanical wear and electronic failures can all cause problems that render drive contents inaccessible. This is unacceptable for any organization, so tactics are often implemented to protect against failure. One of the most common data protection tactics is arranging groups of disks into arrays. This is known as a RAID.

RAID implementations typically offer two benefits; data redundancy and enhanced performance. Redundancy is achieved by copying data to two or more disks -- when a fault occurs on one hard disk, duplicate data on another can be used instead. In many cases, file contents are also spanned (or striped) across multiple hard disks. This improves performance because the various parts of a file can be accessed on multiple disks simultaneously -- rather than waiting for a complete file to be accessed from a single disk. RAID can be implemented in a variety of schemes, each with its own designation: RAID-0 -- RAID-6.

It is also possible to mix RAID levels in order to obtain greater benefits. Combinations are typically denoted with two digits. For example, RAID-50 is a combination of RAID-5 and RAID-0, sometimes noted as RAID-5+0. As another example, RAID-10 is actually RAID-1 and RAID-0 implemented together, RAID-1+0.

The word " disk defrag" is typically used to refer to the Microsoft Windows utility called Disk Defragmenter. It is designed to solve a problem that occurs because of the way hard disks store data.

You know three key facts about hard disks:

· Hard disks store data in chunks called sectors. Each sector holds a fixed amount of data, like 512 bytes.

· The hard disk has a small arm that can move from ring to ring on the surface of the disk. To reach a particular sector, the hard disk moves the arm to the right ring and waits for the sector to spin into position.

· Hard disks are slow in computer terms. Compared to the speed of the processor and its memory, the time it takes for the arm to move and for a sector to spin into place is an eon.

Because of fact #3, you want to minimize arm movement as much as possible, and you want data stored in sequential segments on the disk.

So let's imagine that you install a new application onto an empty hard disk. Because the disk is empty, the computer can store the files of the application into sequential sectors on sequential rings. This is an efficient way to place data on a hard disk.

As you use a disk, however, this efficient technique becomes harder for a disk. What happens is that the disk fills up. Then you erase files to reclaim space. These files that you delete are scattered all over the surface of the disk. When you load a new application or a large file onto the disk, it ends up being stored in hundreds or thousands of these scattered pockets of space. Now when the computer tries to load the scattered pieces, the disk's arm has to move all over the surface and it takes forever.

The idea behind the disk defragmenter is to move all the files around so that every file is stored on sequential sectors on sequential rings of the disk. In addition, a good defragmenter may also try to optimize things even more, for example by placing all applications " close" to the operating system on the disk to minimize movement when an application loads. When done well on older disks, defragmenting can significantly increase the speed of file loading. On a new disk that has never filled up or had any significant number of file deletions, it will have almost no effect because everything is stored sequentially already.

As you might imagine, the process of individually picking up and moving thousands of files on a relatively slow hard disk is not a quick process -- it normally takes hours.

Starting with Windows 98, the defragmenter places the data on the hard drive in the same sequence Windows uses it. The Windows defragmenter also knows what programs you run the most often, and places those on the disk so the computer can access it the fastest possible time.

 






© 2023 :: MyLektsii.ru :: Мои Лекции
Все материалы представленные на сайте исключительно с целью ознакомления читателями и не преследуют коммерческих целей или нарушение авторских прав.
Копирование текстов разрешено только с указанием индексируемой ссылки на источник.