Transcript Hard Drives

Hard Drives
©Richard Goldman
Revised - January 1, 2001
Hard Drives - Physical
Organization
• Modern hard drives have two or more
platters, or disks, that are stacked together
and spin in unison
• Read/write heads are controlled by an
actuator and move in unison across the
disks’ surfaces as the disks rotate on a
spindle
• Data is stored in tracks and sectors
Hard Drives - Physical Organization
Actuator
Arm
Stepper
Motor
Hard Drives - Physical
Organization
• Each head is divided into tracks (or
cylinders) and subdivided into sectors
• The entire first cylinder is filled before the
read/write heads move inward to the next
cylinder
Hard Drives - Physical Organization
A hard drive with four platters
Drive Capacity
• The number of sectors present on the drive
determines the drive capacity
• All sectors in a track hold 512 bytes
• Most earlier drives had 17 sectors per track
• Most drives today have more than 26
sectors per track
• #tracks * #sectors/track * 512 = capacity
Translation
• Translation converts the addressing of
sectors when the hard drive addressing
system does not conform to what System
BIOS expects
• Translation is required:
– When a drive uses zone bit recording
• Does not use the same number of sectors per track
throughout the drive
– On large-capacity drives
Standard Recording
Floppy drives and older hard drives use a
constant number of sectors per track
Zone Bit Recording
Zone bit recording can have more sectors
per track as the tracks get larger
Hard Drives - Partitions
• FDISK first creates a partition, then
assigns drive letters to each logical drive
and creates a boot record, FAT, and root
directory for each logical drive
File Allocation Table
• The OS manages files on the hard drive
using the FAT and a 2nd FAT copy
– FAT contains one entry for each cluster
– A file is stored in one or more clusters
Root Directory
• The layout of the root directories for hard drives is
the same as that for floppy disks
– Total number of bytes for each file is 32
– Date and time are stored as integers
• The OS creates the root directory when it formats
the drive
– Has a fixed number of entries for Win 95 (not 98)
– Immediately follows 2nd copy of the FAT
– Subdirectories can have an unlimited number of entries
• FAT 32 OS allows the Root Directory to be
located anywhere on the Hard Drive and can have
an unlimited number of entries.
Hard Drives - Partitions
• The OS can partition the single physical
hard drive into more than one logical drive,
or partition
– A logical drive is a portion of a hard drive that
an OS views as and manages as an individual
drive
– Information about the logical divisions is
stored in the partition table (or Master Boot
Record, MBR) at the beginning of the drive
Large-Capacity Drives
• Drives that exceed 1,024 cylinders and
more than 528MB are “large capacity” and
require an Enhanced BIOS
• BIOS supports a hard drive as:
– CHS (Cylinders, Heads, Sectors) or normal
mode
– Large mode (504MB to 1G), translation
– LBA (Logical Block Addressing) mode
CHS or
Normal Mode
• Cylinders, heads, sectors (CHS) mode is
the traditional method used by BIOS to
read from and write to hard drives by
addressing the correct cylinder, head, and
sector
• Limited to 1,024 cylinders, 16 heads, and
63 sectors per track
• Maximum drive capacity of 504MB
Large Mode or
Extended CHS (ECHS)
• Supports drives with a capacity from 504MB to 1
GB
• A translation method
– HDD & BIOS communicate with each other in a
method converts CHS address in to address that are
within an acceptable range. (divides the cylinders by 2
and multiplies heads by 2 - # of cylinders must be less
than 1024)
– The BIOS translates this back to communicate with
the OS.
– Set CMOS HDD mode for either “auto”, “large
mode”, “ECHS” or “translation” (if supported).
• Requires and Enhanced BIOS
LBA Mode
or Enhanced BIOS
• Logical block addressing (LBA) is a translation
method used for most large drives.
• (used for SCSI drives)
• Instead of using CHS addresses it uses a series of
numbers for each sector (LBA numbers).
• The OS views the drive as a long list of LBA
numbers.
– The OS correlates the LBA number with a particular
cylinder, head, and sector number
• Requires an Enhanced BIOS
When BIOS Does Not Support
Large-Capacity Drives
• If you want to install a large-capacity drive
on a PC whose BIOS does not support it,
you can
– Upgrade the BIOS
– Upgrade the entire system
– Use software that interfaces between the old
BIOS and the new drive
• Some drives come with disk manager software
already installed
Formatting
• Hard drives are formatted twice
– Low-level format - physically formats the hard drive
and creates tracks and sectors
• Today, this is often done at the factory
– OS Format - puts the boot record, FAT, and root
directory on the disk
• Example: FORMAT C:/S
– If the hard drive is partitioned, each partition has its
own boot record, 2 copies of its FAT, and a root
directory
Hard Drive Technology
• Hardware components
– The hard drive contains read/write heads and 2 or
more spinning platters
– The hard drive requires a controller board filled with
ROM programming to instruct the heads how, where,
and when to move across the platters
– Integrated device electronics (IDE) drives have large
capacity, are easy to install, and are competitively
priced
IDE Technology
• Sectors per track
– The number of sectors per track is not the same
throughout the platter
• Low-level formatting
– IDE drives are low-level formatted by the
manufacturer, and should only be low-level formatted
using a program for IDE drives
• Adapter card
– A small, inexpensive card that passes data commands
to and from the drive controller
Enhanced IDE Technology
• EIDE allows up to 4 devices on the same
computer, such as:
– Hard drives, CD-ROMs, tape drives...
• EIDE uses logical block addressing rather
than the CHS method to exceed the
528MB limit on data storage
• Uses 40 pin connector (44 pin if power is
included – used on some laptop computers)
SCSI Technology
• Small Computer Systems Interface (SCSI)
is another standard for communication to
the system bus
• The SCSI bus is a closed system that can
contain up to 8 devices
• The adapter card, or host adapter, is
responsible for managing all devices on the
SCSI bus and interfaces with them directly
IDE/SCSI Drives Communication
IDE
SCSI
SCSI Technology
• SCSI-1
– Oldest SCSI bus standard, established in 1986 by
American National Standards Institute (ANSI),
requiring an 8-bit bus
– Set of standards for all manufacturers to follow so that
devices can be more readily exchanged
– Devices are strung together in a daisy chain ending
with a terminating resistor
– Cables use 50-pin connections
SCSI Technology
SCSI Technology
• SCSI-2
– Improvement over the SCSI-1 bus
– Requires parity checking
– Easier installation
• Wide SCSI
– Version on SCSI-2 requiring a 16- or 32-bit data path
– 68-pin connections
– Can support up to 16 devices
SCSI Technology
• Ultra SCSI
– Also called Fast-20, Fast SCSI, or SCSI-3
– Offers 20MB/sec burst transfers across 8-bit
paths and 40MB/sec burst transfers across 16bit paths
– Supports SCSI configuration automatically,
which follows the Plug-and-Play standard
– Offers a serial bus in addition to the traditional
parallel SCSI bus
SCSI
Bit Transfer Width, Cable Width, & Devices per Controller
8-bit, 50-pin, 7-devices
16-bit, 68-pin, 15-devices
MB/sec
MB/sec
Standard
5
Standard/Wide
10
Fast
10
Fast/Wide
20
Ultra
20
Ultra/Wide
40
(7 devices)
Ultra2
40
(LVD)
Ultra3
(LVD)
Ultra2/Wide
80
(LVD)
80
Ultra3/Wide
(LVD)
160
SCSI Drives
Sample SCSI configuration
SCSI Technology - Termination
• There are several ways to terminate electrical
power at the end of the daisy chain to prevent an
echo effect of power which could result in
damage of the data transmission
– The host adapter can have a switch that
activates/deactivates a terminating resistor on the card
– An external terminator can be placed on the
connection of a device in the chain
SCSI Technology - Termination
– The device at the end of the chain can be
terminated by a resistor that is physically
mounted on the device in a specially designed
socket
– Some devices have built-in terminators that
can be turned on or off with a jumper setting
on the device
– Termination can be controlled by software
SCSI Technology - Termination
SCSI Technology
• Device drivers are necessary for the OS to
communicate with a host adapter
• No SCSI device drivers are included with
Windows 3.1 or DOS, drivers are supplied
with the device and loaded in the
CONFIG.SYS file
• Windows 95 has built-in support for SCSI
devices
Comparing SCSI and EIDE
Hard Drives
• A SCSI hard drive costs more
• A SCSI subsystem provides faster data
transfer than an EIDE drive, but this is due
to the SCSI bus
• A SCSI bus supports multitasking, whereas
with an EIDE drive, the data from only one
I/O device at a time can be processed
Comparing SCSI and EIDE
Hard Drives
• A good SCSI host adapter allows you to connect
other devices to it, such as a printer, scanner, or
tape drive
• If you have 2 IDE drives on the same adapter,
only 1 of them can be busy at a time, while SCSI
drives allow multiple devices to operate
simultaneously
– If you plan to transfer a lot of data from CD-ROM to
hard drive, this is a good reason to choose SCSI