MAGNETIC STORAGE

MAKING MEMORY FROM MAGNETS

The medium contains the message - the low down basics

First a medium is coated with magnetic particles made from iron oxide with traces of cobalt, chromium and nickel.


I've got to get more organized!

WRITING - An electromagnet, called a read/write head, is then passed over the medium. This magnet’s job is to energize and align the particles into an orderly fashion.


Don’t worry; I'll get you in line!

Once encoded on the disk, these magnetic patterns work together to form a very weak magnetic force. The variations of polarities of these particles are called flux reversals.

READING - When the power to the read/write head is turned off (called read mode) the head is able to read (using the principles of induction) the slight changes in magnetic alignment and interprets these as binary ones and zeros.

So how do you make ones and zeros from these neatly aligned magnetic particles? It’s all about ENCODING METHODS.

Encoding method - the RULES!


Rule 1:
For a
one the polarity of the bit-pair column is reversed – blue to blue or red to red.

Rule 2:
When creating a
new bit pair, the first column in the next bit should be the opposite of the last column in the last bit.

Rule 3:
For a
zero the polarity of the bit-pair column should not be reversed – blue to red

 

1

1

0

1

These rules are for FM Encoding



MFM encoding packs extra bits onto the disk – almost doubling the capacity.
If you were a computer, it might feel like this... (these are changes in voltages)


Tracks and sectors

In order for the computer system to find anything on the disk, it must have some kind of roadmap. Digital roads and signposts must be erected to enable the system to know where it is from the edge of the disk, or radially on the disk as the disk spins. These guideposts are called tracks and sectors.

A track is an invisible concentric ring on disk. Each ring is then divided up into portions called sectors. The number of tracks and the number of sectors per disk depend on the type of disk and the capacity of that disk.

Tracks

  • Tracks start with zero (outermost part of disk) and work up
  • Invisible concentric rings
  • Magnetic flux reversals

Sector

  • Sectors start with one and work their way around the disk
  • Smallest physical unit a drive can deal with
  • 512 bytes. However…
  • The real contents of a sector…

Who builds these?

These digital signposts are erected when a disk is formatted.

Formatting - Very A+

There are really two types of formatting that you need to do on a disk’s media before it is ready to receive data:

  • Low-level – or a physical format
  • High-level – or a logical format. Prepares disk for OS.

When you use a disk-formatting program on your floppy disk, you are performing both a high-level and a low-level format of that drive’s media – the program does them simultaneously.

When you use that same formatting program on your hard drive, you are performing ONLY the high-level format.

  • You should not low-level format modern IDE drives. This step is done at the factory.
  • Older RLL and MFM and SCSI drives can be low-level formatted.

 

Oh no, geometry! It sounds like math – but it’s not.

A drive’s geometry refers to internal electronic organization. This kind of geometry helps us describe the capacities and characteristics of a disk. The terms that describe this vary between hard and floppy disks.

    Floppy

    Hard disk


  • (Disk medium)
  • Tracks
  • Sectors (same # per track)
  • Sides

  • Platters (the disks)
  • Cylinders (the same track # on each platter)
  • Sectors (# may vary per track)
  • Heads

This geometry can help the drive find stuff on the disk.

 

FLOPPY DISK

A floppy drive is called a floppy drive because the media the computer writes to is floppy. This thin Mylar disk sits inside either a hard plastic container (like in a 3.5 inch disk) or a flexible composite container (like a 5.25 inch disk).

3 1/2 High Density 1.44MB - two cut-outs

 

512

Bytes per sector

 

18

Secter per track

 

80

Track per side

 

2

Side per disk

 

1,474,560

Bytes

Note that a double density disk contains 720K of storage space

To find the true meaning of life (or the number of bytes on the floppy), divide the total by 1K (or 1024)


Getting your floppy connected - Very A+

  • Floppy cable - 34 pin
  • If cable is reversed the drive light comes on and stays on
  • Pin 34 - disk change indicator
Drive A: the "twist" Drive B:
34-pin connector
at drive
connector for 5.25
& 3.5 inch drives
red wire is
at bottom
34-pin connector at mobo
<

Installation

  • Needs drive bay
  • Needs Power
  • Needs Data - 34 pin female connector on cable
  • Check CMOS

 

Hard Disk A hard disk is called a hard disk because the media it writes to is hard. The actual disk inside the hard drive mechanism is called a platter. A hard disk may have several platters. Platters for modern PCs may range from postage stamp size up to 5.25 inches.

IDE (Integrated Drive Electronic) drives contain both the controller and the drive in a single unit.

 

Physical Geometry – CMOS Setup Stuff

  • Cylinder - same track on each head (all tracks on the hard drive with the same diameter)
  • Heads (disk surfaces)
    • Platter (disk)
    • A R/W head for each side of each platter
  • Sectors - more sectors on outside track. Zoned bit recording

CHS – Cylinders, Heads and Sectors – the GEOMETRY - Very A+

 

Funny math – You sat tomato, I say tomahto…

Most drives today are Gigabytes in capacity

Billions of bytes vs. Gigabytes.

1 Billion bytes = 1,000,000,000

1GB = 1,073,741,824


Size in GB = (Cylinders * Heads * Sectors * 512) / 1,000,000,000

They say gigabytes. You get the billions of bytes. It’s called marketing.

 

Alphabet Soup Hard Drive Technology - Very A+

MFM & RLL – Old, no longer used.

  • Equal number of sectors per track
  • ST506 and ESDI (enhanced small drive interface) controller.
  • Controller circuitry (brains) on adapter card, dumb drive.

IDE (Integrated Drive Electronics) / ATA (AT Attachment - set of rules and protocols)

  • Zoned bit recording, not an equal number of sectors per track.
  • The controller circuitry is on the drive itself.
  • Two drives may share a cable – Master / Slave drives.
  • Initially Hard drives only – no CDROM support
  • CMOS – can query drive and auto-detect geometry

EIDE Enhanced IDE (also known as ATA standards 2-6)

  • More rules and protocols – T13 Committee
  • ATAPI - (ATA Packet Interface) adds support for CD ROM and tape drives
  • 8 devices on 4 channels – 137GB size barrier* and ~133MBs data transfer rate)
    • Some motherboards support 4 channels (along with RAID) most do not
    • IDE Expansion cards may provide additional channels or expanded capabilities
  • PIO modes 0-4*
  • S.M.A.R.T. - Self-Monitoring Analysis and Reporting

*New ATA standard calls for a 48-bit number to hold CHS quantities. Up to 144 petabytes

 

Enhancements

PIO* - Programmed I/O. Much of the data transfer is performed by the CPU - the processor is responsible for executing the instructions that transfer the data to and from the drive.

  • Modes 0-4 – Mode 4 has a 16MB/s data transfer rate.
  • Set in CMOS - Although the drive can usually set its own mode.
  • There were hard disks that said they are able to use PIO mode 2 but they only worked reliably in PIO mode 1! Whenever you get errors accessing your hard disk, try to lower the PIO mode first!

DMA - a transfer protocol where a peripheral device transfers information directly to or from memory, without the system processor being required to perform the transaction.

  • Modes 0-2 – Mode 2 has a 16MB/s data transfer rate. Single-word.
  • Multi-word (blocks of data).
  • Ultra ATA / DMA (Mode 3 and up) is 33 / 66 / 100 / 133 MB/s – UDMA33… UDMA66 etc.
  • Bus master - DMA with device calling the shots. Doesn’t use the standard ISA DMA circuitry. Smart devices can take over bus from CPU or when CPU doesn’t need it.

Bus mastering has to be supported by the device, the chipset, and the operating system in order to work.

 

SERIAL ATA - Very A+

Serial ATA is an evolutionary replacement for the Parallel ATA physical storage interface. Serial ATA is scalable and will allow future enhancements to the computing platform.

  • Data bits sent in "single file"
  • 150MBs data transfer rate (Scaling to 600MBs within 10 years)
  • Thin, point-to-point connection that allows for easy cable routing within a system
  • Avoids master/slave, "daisy-chaining", and termination issues
  • Better airflow can be realized compared to systems with wider ribbon cables
  • Software compatible with parallel ATA

Getting your hard drive connected

Standard IDE ribbon cable – 40 pins

Standard and special high-speed cable 40-pins 80-wires


Serial ATA (SATA) cables and Mobo

 

IDE - Master (0) / Slave (1) - Very A+

  • Primary and Secondary channels
  • Up to two drives may share a channel
  • Used to differentiate drives – Master is "first" slave is "second"
  • Since it doesn’t matter where on the cable a drive plugs into, the master and slave relationship is set up on the drive itself
  • We are now seeing more Cable Select cables – cables with 80 wires are cable select. In this case the Master is at the end of the cable with both devices set to cable select

 

"Uh... Houston, We have a BIG problem" (… your HD 1994)

Some Background

  • Hardriveability (note, I made up that word) is a function of the BIOS
  • INT13 – the original BIOS commands used to access the hard drive
  • INT13 extensions – new set of BIOS commands that work with translation methods to deal with large capacity drives.

Drives that exceed 528 million bytes (504MiB) are called large capacity drives and must use translation methods to allow the PC to use the drive to its full capacity. Very A+

The 504MB limitation in older BIOS’s has to do with the combined limitations of the ATA (IDE) specification and the INT13 calls in the original IBM BIOS specification, as shown below.

How did this ever happen?

 

INT 13 BIOS

ATA (IDE) Specification

Combined Limitation

Bits Available

24

28

 

Cylinders

1024(10 bits)

65536 (16 bits)

1024

Heads

256 (8 bits)

16 (4 bits)

16

Sectors

63 (6 bits)

256 (8 bits)

63

Total Size

8GB

128GB

504MB


A drive’s Translation Method is a means of mapping between the physical geometry of the disk and the (CHS) restrictions within the BIOS. Within CMOS setup you will have 3 options.

  • CHS (normal mode / no translation) – 504MB max
  • Large mode (Revised Extended CHS) – ~8GB max
  • LBA (logical block addressing + INT13 extensions) – >8GB max

The requirements for LBA/INT13h Extended disk access are as follows:

  • An operating system that can make Extended INT13h (LBA) calls.
  • A BIOS that understands Extended INT13h (LBA) calls.
  • A BIOS that can make LBA calls.
  • A disk controller that understands the LBA values referenced.

Note that there are at least 4 major BIOS capacity barriers: 528 MB, 8.4 GB, 33 GB and 137 GB


If you use a different translation method than the drive was formatted with (i.e. change translation methods on a drive), you will not be able to access any data from that drive - until you change back to the drive’s native translation method.


Need large capacity support? - Very A+

  • Upgrade BIOS – flash it!
  • Upgrade motherboard
  • Use translation software - Ontrack Disk Mgr, Max-blast - known generically as DDO (dynamic drive overlay) software

Tape Drives - Very A+

As consumers we seldom think of backing up to tape (or even backing up for that matter). Industry lives and dies by their tape backup devices.

As a backup medium tape has several advantages

  • Cost – the mechanisms are relatively inexpensive and cost per gigabyte of media is low
    • Drives start at $200 and go up (wayyyyyy up)
  • Capacity – tape is doing its best to keep up with hard drive capacity.
    • 100GB? Not a problem!
    • 1600GB? Bring it on!
    • Data may be stored compressed
  • Reliability – It’s a well-proven technology
  • Speed. OK, speed may not be an advantage.
    • SCSI drives are "best in class"

Historically, mediums vary drastically

  • DDS/DAT
  • QIC
  • Travan

Disk Organization – left up to the OS

Sector – Smallest PHYSICAL unit a drive can access. Made up of 512 bytes.

Cluster – Smallest LOGICAL unit an operating system can access. Made up of one or more sectors. Generally, larger capacity disks have a larger cluster size. File allocation units.

Partition – A single physical hard disk (not ZIP) can contain multiple logical disks. FDISK is a program used to create partitions. There must be a primary partition on each bootable physical disk. An extended partition may be used to contain additional logical drives.

Volume – a physical or logical storage medium – i.e. hard disk or a partition on a hard disk

FAT – The area of a volume where a table is maintained that manages the disk’s organization. It tells the system where on the volume each piece of each file is PHYSICALY located.

  • FAT12 - Uses a 12-bit number to define the maximum number of storage locations (clusters) on the volume. Max volume size = 16MB
  • FAT16 - Uses a 16-bit number. Max volume size = 2GB
  • FAT32 – Uses a 32-bit number (only 28-bits are actually used). Max volume size = 2TB

FDISK - Very A+

FDISK is a menu driven utility used to configure and/or display information about the partitions on a hard disk. CAUTION: Using FDISK to modify or delete partitions on a hard drive renders all the data associated with that partition unavailable - ie. deleted!

Syntax - To run the FDISK utility: FDISK

  • Creates table in master boot record (MBR)
  • Primary partition
  • Extended partition - up to 23 logical drives (D-Z) - Very A+

Why FDISK?

  • Because you want to
    • Multiple OS
    • Organize
    • Reduce slack
  • Because you have to
    • Older FATs and large capacity drives

MBR (Master Boot Record)

  • A table that contains the location of partitions on a hard disk.
  • Each hard disk has a single MBR – located at head 0, cylinder 0, sector 1
  • Great place for a boot sector virus

If the MBR is damaged or infected with a virus, it may possibly be repaired with the command FDISK /MBR. - Very A+

Installing a hard drive

6 Step Process

  1. Low level format - done at factory
  2. Set jumpers and physically install drive
  3. Tell CMOS
  4. FDISK - sets up logical partitions. HD only
  5. High level format - FORMAT c: /s
  6. Add GUI operating system

How DOS assigns drive letters

Primary partition on master drive gets C:
Primary partitions on next physical drives get next letters
Then logical drives on extended partitions on next physical disks


Let's examine a system after adding a new hard drive: Very A+

Partition Before After
Hard Disk 1: Primary Partition C: C:
Hard Disk 1: 2 logical Drives D:, E: E:, F:
Hard Disk 2: Primary Partition -- D:
Hard Disk 2: 1 logical Drive -- G:

Edited (2003) By Vlad Magero