how operating system manages disk drives? how can we prevent disk damage

16
TERM PAPER OF CSE-316: OPERATING SYSTEM AND CONCEPT Topic: How operating system manages disk drives? How can we prevent disk damage. Submitted by: AVINASH MANHAS Submitted to:

Upload: eoghan-mac

Post on 22-Nov-2014

616 views

Category:

Documents


0 download

DESCRIPTION

TERM PAPER OFCSE-316: OPERATING SYSTEM AND CONCEPT Topic: How operating system manages disk drives? How can we prevent disk damage.Submitted by: AVINASH MANHAS Roll.no- RE2801B46 Reg.no- 10809450 Course- B Tech-M.Tech( IT) Submitted to: Mr. Pushpendra Kumar PetriyaContents:  Operating System Functions Disk Drive • WHAT IS A HARD DISK DRIVE? • Types of Hard Disk Drives a. ATA Disk Drives b. FireWire Disk Drives c. SCSI Disk Drives d. Using a RAID or Disk Array e. Storage Area Networks

TRANSCRIPT

TERM PAPER

OF

CSE-316: OPERATING SYSTEM AND CONCEPT

Topic: How operating system manages disk drives? How can we prevent disk damage.

Submitted by:

AVINASH MANHAS Submitted to:

Roll.no- RE2801B46 Mr. Pushpendra Kumar Petriya

Reg.no- 10809450

Course- B Tech-M.Tech( IT)

Contents:

Operating System Functions

Disk Drive WHAT IS A HARD DISK DRIVE? Types of Hard Disk Drives

a. ATA Disk Drivesb. FireWire Disk Drivesc. SCSI Disk Drivesd. Using a RAID or Disk Arraye. Storage Area Networks

Disk Management Accessing Disk Management Basic Disk Management Functions

Hard Disk Failure and Prevention

Future Development

References

Operating System Functions

At the simplest level, an operating system does two things:

1. It manages the hardware and software resources of the system. In a desktop computer, these resources include such things as the processor, memory, disk space and more (On a cell phone, they include the keypad, the screen, the address book, the phone dialer, the battery and the network connection).

2. It provides a stable, consistent way for applications to deal with the hardware without having to know all the details of the hardware.

The first task, managing the hardware and software resources, is very important, as various programs and input methods compete for the attention of the central processing unit (CPU) and demand memory, storage and input/output (I/O) bandwidth for their own purposes.

The second task, providing a consistent application interface, is especially important if there is to be more than one of a particular type of computer using the operating system, or if the hardware making up the computer is ever open to change

Disk storage is only one of the memory types that must be managed by the operating system, and it's also the slowest. Ranked in order of speed, the types of memory in a computer system are:

High-speed cache -- This is fast, relatively small amounts of memory that are available to the CPU through the fastest connections. Cache controllers predict which pieces of data the CPU will need next and pull it from main memory into high-

speed cache to speed up system performance.

Main memory -- This is the RAM that you see measured in megabytes when you buy a computer.

Secondary memory -- This is most often some sort of rotating magnetic storage that keeps applications and data available to be used, and serves as virtual RAM under the control of the operating system.

DISK DRIVE

A hard disk is part of a unit, often called a "disk drive," "hard drive," or "hard disk drive," that stores and provides relatively quick access to large amounts of data on an electromagnetically charged surface or set of surfaces. Today's computers typically come with a hard disk that contains several billion bytes (gigabytes) of storage.

A hard disk is really a set of stacked "disks," each of which, like phonograph records, has data recorded electromagnetically in concentric circles or "tracks" on the disk. A "head" (something like a phonograph arm but in a relatively fixed position) records (writes) or reads the information on the tracks. Two heads, one on each side of a disk, read or write the data as the disk spins. Each read or write operation requires that data be located, which is an operation called a "seek."

A hard disk/drive unit comes with a set rotation speed varying from 4500 to 7200 rpm. Disk access time is measured in milliseconds. Although the physical location can be identified with cylinder, track, and sector locations, these are actually mapped to a logical block address (LBA) that works with the larger address range on today's hard disks.

WHAT IS A HARD DISK DRIVE? 

Not unlike a Floppy Diskette, a Hard Disk Drive is a mass storage device for data held as magnetic media flux reversals, commonly in binary form as ones and zeros. The essential differences between floppy and hard drives are:

1. Speed of writing to and reading from the drive.

2. Capacity to store data. DIFFERING TYPES OF HARD DISK DRIVES have appeared but the commonly accepted types are:

i. Fixed hard drive.such as the 1OMb or 20Mb unit that is common in the XT style of Machine.

ii. Hard Card. This integrated drive and controller takes the form of a full length peripheral card and plugs into the XT Bus as would any other card. It is ideally suited to machines with limited space for drive placements such as the Olivetti M24.

iii. Removable Media hard drive. Units such as Syquest, Bernoulli and DMA have manifested themselves in the marketplace but with limited success for various reasons. The concept of having 5Mb to 30Mb of removable magnetic media is, in theory, great from the aspect of security and backup, but reliability has hampered some of these products. Experience showed that in

many instances, data written to a removable pack in one drive, cannot be retrieved from a different drive of the same type.

iv. CD ROM (Compact Disk Read Only Memory) These units are for high speed management of bulk Fixed data such as Encyclopaedia, Dictionaries and Directories. No data write facility exists in this particular system, as CD ROMS such as Groliers' Dictionary are purchased "ready to run."

v. WORM (Write Once Read Multiple) drives are the newest technology, allowing the user to write ONCE via a laser beam altered Dye Line. After this one time write has been effected, retrieval is by the same method as for the CD ROM.

Types of Hard Disk Drives

Disk drive technologies have advanced quickly

over recent years, making terabytes of storage

available at reasonable cost. When researching

the type of hard disk storage system appropriate

for your needs, keep in mind the format and data

rate of the video you’re capturing. Depending on

whether you work as an independent video

editor or collaborate with others, the amount of

storage you require and the bit rate of data

transfer will be important factors to match up

with your storage needs. Outlining all of the

hard disk storage technologies is beyond the

scope of this documentation, but four common

choices include:

ATA

FireWire

SCSI

RAID and Fibre Channel

ATA Disk Drives

There are two kinds of ATA disks:

Parallel (Ultra) ATA disks: These are

found in Power Mac G4 computers.

Serial ATA disks: These come with

Power Mac G5 computers.

ATA disks do not offer as high a level of

performance as LVD or Ultra160 SCSI disks. If

you plan to use Ultra ATA disks, make sure that:

The sustained transfer speed is

8 MB/sec. or faster

The average seek time is below 9 ms

The spindle speed is at least 5400 rpm,

although 7200 rpm is better

Parallel (Ultra) ATA Disks

Parallel ATA disks use 40- or 80-pin-wide ribbon cables to transfer multiple bits of data simultaneously (in parallel), they have a cable length limit of 18 inches, and they require five volts of power. Depending on your computer, there may be one or more parallel ATA (or IDE) controller chips on the motherboard.

Serial ATA DisksSerial ATA (SATA) disks are newer than parallel ATA disk drives. The disk drive mechanisms may be similar, but the interface is significantly different. The serial ATA interface has the following characteristics:

Serial data transfer (one bit at a time)

150 MB/sec. theoretical data throughput

limit

7-pin data connection, with cable limit

of 1 meter

Operates with 250 mV

Only one disk drive allowed per serial

ATA controller chip on a computer

motherboard, so disk drives do not have

to share data bandwidth

FireWire Disk Drives

Although not recommended for all systems,

FireWire disk drives can be effectively used to

capture and edit projects using low data rate

video clips, such as those captured using the DV

codec. However, most FireWire disk drives lack

the performance of internal Ultra ATA disk

drives or of internal or external SCSI disk

drives. For example, a FireWire disk drive may

not be able to support real-time playback with as

many simultaneous audio and video tracks as an

internal Ultra ATA disk drive can. This can also

affect the number of simultaneous real-time

effects that can be played back.

SCSI Disk Drives

Small Computer System Interface (SCSI) disk

drives used to be among the fastest drives

available, although newer computers may no

longer provide SCSI ports. Although no longer

highly popular, SCSI technology has been

implemented in various ways over the years,

with each successive generation achieving better

performance. Two fast SCSI standards for video

capture and playback are:

Ultra2 LVD (Low Voltage Differential)

SCSI: Ultra2 LVD SCSI disk drives

offer fast enough performance to capture

and output video at high data rates when

a single disk is formatted as a single

volume (as opposed to formatting

several disks together as a disk array).

Ultra320 and Ultra160 SCSI: These are

faster than Ultra2 LVD SCSI disks.

Using a RAID or Disk Array

You can improve the transfer speed of

individual disks by configuring multiple disk

drives in a disk array. In a Redundant Array of

Independent Disks (RAID), multiple SCSI,

ATA, or FireWire disk drives are grouped

together via hardware or software and treated as

a single data storage unit. This allows you to

record data to multiple drives in parallel,

increasing access time significantly. You can

also partition the array into multiple volumes.

Creating a disk array is necessary only if high

performance is required to capture and play back

your video at the required data rate without

dropping frames.

If you require rock-solid data integrity, consider

purchasing a RAID. Many RAIDs record the

same data on more than one disk, so that if a

drive fails, the same data can still be retrieved

from another disk. There are many RAID

variations available, but one that offers high

performance for both digital video capture and

data redundancy is RAID level 3. Because they

use specialized hardware, RAID level 3 systems

can be more expensive, but they should be

considered

Storage Area Networks

A storage area network (SAN) such as an Apple

X san system consists of one or more disk arrays

that are made available to multiple computer

systems simultaneously. Broadcast and post-

production facilities can use an X san system to

share a single set of media files among multiple

editing systems.

X san software allows an administrator to

control SAN access privileges for each editing

system. For example, a capturing edit station

may have read-and-write access to the SAN,

while an assistant editor station may only have

read access to media files for a particular

project. An administrator may also control

permissions to make sure editors capture

material only to specific folders.

Disk Management

The hard disk is the secondary storage device that is used in the computer system. Usually the primary memory is used for the booting up of the computer. But a hard disk drive is necessary in the computer system since it needs to store the operating system that is used to store the information of the devices and the management of the user data.

The management of the IO devices that is the Input Output devices, like the printer and the other peripherals like the keyboard and the etc; all require the usage of the operating system. Hence the information of the all such devices and the management of the system is done by the operating system. The operating system works as an interpreter between the machine and the user.

The operating system is a must for the proper functioning of the computer. The computer is a device that needs to be fed with the instructions that are to be carried out and executed. Hence there needs to be an interpreter who is going to carry out the conversions from the high level language of the user to the low level language of the computer machine.

The hard disk drive as secondary memory is therefore needed for the purpose of installing the operating system. If there is no operating system then the question arises where to install the operating system. The operating system obviously cannot be installed in the primary memory however large that may be. The primary memory is also a volatile memory that cannot be used for the permanent storage of the system files of the operating system. The operating system requires the permanent file storage media like the hard disk.

More over the hard disk management is an important part of maintaining the computer,

since it requires an efficient management of the data or the user information. The information regarding the Master Boot Record is stored in the hard disk drive. This is the information that is required during the start up of the computer. The computer system needs this information for loading the operating system.

The file management and the resources management is also a part of the hard disk management. The hard disk management requires an efficient knowledge of the operating system and its resources and the methods of how these resources can be employed in order to achieve maximum benefit. The operating system contains the resources and the tools that are used to manage the files in the operating system. The partitioning and the installation of the operating system itself may be considered as the hard disk management.

The hard disk management also involves the formatting of the hard disk drive and to check the integrity of the file system. The data redundancy check can also be carried out for the consistency of the hard disk drive. The hard disk drive management is also important in the case of the network where there are many hard disk drives to be managed.

Managing a single hard disk in a single user operating system is quite easy in comparison with the management of the hard disk drives in a multi user operating system where there is more than one user. It is not that much easy since the users are also required to be managed.

Accessing Disk Management

There are a few different ways to access Disk Management. I'll list three different

methods so choose whichever is more convenient.

Method 1  -  Start > Control Panel > Performance and Maintenance > Administrative Tools. Double click Computer Management and then click Disk Management in the left hand column.

Method 2 - By default, Administrative Tools is not shown on the Start Menu but if you have modified  the Start Menu (by right clicking the Start button and selecting Properties > Customize) so it is shown then just select Start > Administrative Tools >  Computer Management and then click Disk Management in the left hand column.

Method 3 - Click Start > Run and type diskmgmt.msc in the Open: line and click OK. The Disk Management snap-in will open.

Three Basic Areas of Disk Management

The basic Disk Management console is divided into three main areas and just about as straightforward as one can get. In Fig. 01 the areas are defined by green, red, and blue rectangles. The Console Tree is the tall vertical column on the left that's defined by the green colour. If Method 3 above is used to open Disk Management it will open without the Console Tree being displayed. I suggest you get rid of the Console Tree as it really serves no purpose once Disk Management is open. Even if you used one of the other methods, the Console Tree can be eliminated by clicking the Show/Hide Console Tree icon (fourth from left) on the standard toolbar.

The red and blue areas are referred to as Top and Bottom and are both user definable via the View menu option. By default, the Top area displays the Volume List and the Bottom area displays the Graphical View. A third view called Disk List can be substituted in either pane if it's more to your liking, or the Bottom pane can be hidden completely. The View menu option also contains a [Settings...] option that allows adjustment of the colour schemes, size of the drive displays and a few other options so the console can be tailored to individual taste.

Basic Disk Management Functions

All too often the help documentation that's supplied with programs falls short of the mark, but in the case of Disk Management I think Microsoft did an above average job. I suggest giving it a thorough read through as it contains detailed instructions for performing many tasks that it's not immediately apparent Disk Management can handle. I'll list a few of the more common tasks that interest a wide cross section of users.

Create partitions, logical drives, and volumes.

Delete partitions, logical drives, and volumes.

Format partitions and volumes.

Mark partitions as active.

Assign or modify drive letters for hard disk volumes, removable disk drives, and CD-ROM drives.

Obtain a quick visual overview of the properties of all disks and volumes in the system.

Create mounted drives on systems using the NTFS file system.

Convert basic disks to dynamic disks.

Convert dynamic to basic disks, although this is a destructive operation.

On dynamic disks, create a number of specialty volumes including spanned, striped, mirrored, and RAID-5 volumes.

Disk Management makes extensive use of context menus. Right clicking on a drive or partition will normally present a menu that contains the options and procedures available for the particular device. The Action menu item is an alternate method for determining the same information. An advantage of using Disk Management is the majority of changes you can make don't require rebooting the system so you can continue working while the procedures complete.

At first glance it may appear there isn't much substance to Disk Management, but in truth it can be quite useful for many tasks. That's not to say it's without limitations because it does have some. One of the major limitations is the inability to resize a partition to make it smaller in a non-destructive manner. That limitation, and others, can be overcome by a number of third party utilities to fill in the gaps where Disk Management is lacking, but a full understanding of what Disk Management can and cannot do relative to your individual situation and needs will help you determine if a third party disk management utility is necessary.

Hard Disk Failure and Prevention

Broadly speaking a hard disk can fail in four ways that will lead to a potential loss of data:

1. Firmware Corruption / Damage to the firmware zone

2. Electronic Failure

3. Mechanical Failure

4. Logical Corruption

Combinations of these four types of failure are also possible. Whether the data on the hard disk is recoverable or not depends on exactly what has happened to the disk and how bad the damage is. Please note that over time, all hard disks will develop bad sectors which can lead to data loss and drive inaccessibility.

1. Firmware Corruption / Damage to the firmware zone

Explanation: Hard disk firmware is the software code that controls, and is embedded in, the physical hard drive hardware. If the firmware of a hard disk becomes corrupted or unreadable the computer is often unable to correctly interact with the hard disk. Frequently the data on the disk is fully recoverable once the drive has been repaired and reprogrammed.

Firmware failures - How to diagnose: Common Symptoms

The hard disk will spin up when powered on, but be incorrectly recognised / not recognised at all by the computer

The hard disk will spin up & be recognised correctly by the computer but the system will then hang during the boot process

Actions to take

Recovering data from hard drives with firmware failure requires low level reprogramming / manipulation of the hard drive. It is not possible for a PC repair shop to do this. Data Clinic have our own specialist equipment that allows us to successfully recover data from hard drives with firmware faults.

2. Electronic Failure

Explanation: Electronic failure usually relates to problems on the controller board of the actual hard disk. The computer may suffer a power spike or electrical surge that knocks out the controller board on the hard disk making it undetectable to the BIOS.

Electrical failures - How to diagnose: Common Symptom

The hard disk will not spin up when the drive is powered on - it will appear dead & not be recognised by the computer

Actions to take

Data Clinic can recover data from all types of electrical hard drive failure.

3. Mechanical Failure

Mechanical hard disk failures are those which develop on components internal to the hard disk itself. Often as soon as an internal component goes faulty the data on the hard disk will become inaccessible.

Mechanical failures - How to diagnose: Common Symptoms

When powered on, the hard drive will immediately begin to make a regular ticking or clicking sound

Actions to take

Recovering data from hard drives with mechanical failure requires the drive to be worked on in a clean room as the drive has to be taken apart and investigated in lab conditions. Data Clinic have a fully equiped Class 100 clean room which we use to recover drives with mechanical problems.

4. Logical Errors

Often the easiest and the most difficult problems to deal with, logical errors can range from simple things such as an invalid entry in a file allocation table to truly horrific problems such as the corruption and loss of the file system on a severely fragmented drive. Logical errors are different to the electrical and mechanical problems above as there is usually nothing 'physically' wrong with the disk, just the information on it.

Logical errors can also be tackled with various software tools you can buy off the net, but be warned - if you are intending to run a fix utility on your disk you can very easily make recoverable data unrecoverable. This is especially true when running ScanDisk and Chkdsk on a damaged hard drive.

Future development

Because of bit-flipping errors and other issues, perpendicular recording densities may be supplanted by other magnetic recording technologies. Toshiba is promoting bit-patterned recording (BPR), while Xyratex is developing heat-assisted magnetic recording (HAMR).

References:

http://en.wikipedia.org/wiki/Hard_disk_drive

www.webopedia.com/TERM/D/disk_drive.html

Operating System concepts by galvin www.acronis.com/homecomputing/.../

diskdirector/index.html Accelerate Your Hard Drive By Short

Stroking