/* ----------------------------------------------- ----------------------------------------------- */

Hard Disk Diagram
Hard Disk Diagram
Types of Storage Devices
Categorizing devices
The purpose of storage devices is to hold data even when the computer is turned off- so the data can be used whenever it is needed. Storage involves two processes:
·       Writing data – or recording data on the surface of a disk or tape –where it is stored for later use.
·       Reading data or retrieving the data from the surface of a disk or tape and then transferring it into the computer’s memory.
The physical materials on which data is stored are called storage media. The hardware components that write data to, and read it from, storage media are called storage devices. The two main categories of storage technology used today are magnetic storage and optical storage.
Hard Disk
Hard Disk

Magnetic Storage
Optical Storage
          Hard disks
          Floppy disks
          Magnetic tape
         Disk cartridges
          Memory (CD-ROM)
          Compact Disk Read-Only Memory (CD-ROM)
          CD-Recordable (CD-R) / CD –Re-Writable (CD-RW)
        High –Capacity Digital Video Disk Read-Only Memory (DVD-ROM)
          DVD Recordable (DVD-R) / DVD Re-Writable (DVD-RW)
          Photo CD

Magnetic Storage Devices:
The surfaced of diskettes, hard disks, high-capacity floppy disks and magnetic tape are coated with a magnetically sensitive material, such as iron oxide, that reacts to a magnetic field. Diskettes contain a single thin disk, usually made of plastic. This disk is flexible, which is why diskettes are often called floppy disks. Hard disks usually contain multiple disks, which are called platters because they are made of a rigid material such as aluminum.

How Data is Stored on a Magnetic Disk:
We may remember from science projects that one magnet can be used to make another. For example we can make a magnet by talking an iron bar and stroking it in one direction with a magnet. The iron bar becomes a magnet itself, because its iron molecules align themselves in one direction. Thus, the iron bar becomes polarized; that is, its ends have opposite magnetic polarity.
The surface of disks magnetic tapes are coated with millions of tiny iron particles so that data can be stored on them. Each of these particles can act as magnet, talking on a magnetic field when subjected to an electromagnet. The read / write heads of a generate magnetic fields in the iron on the storage medium as the head passes over the disk or tape. The read / write heads record strings of 1s or 0s by alternating the direction of the current in the electromagnets.
To read data from a magnetic surface, the process is reversed. The read / write head process over the disk or tape while no current is flowing through the electromagnet. Because the storage medium has a magnetic field but the head does not, the storage medium charges the magnet in the head, which causes a small current to flow through the head in one direction or the other, depending on the polarity of the field. The disk or tape drive senses the direction of the flow as the storage medium passes by the head, and the data is sent from the read / write head into memory.
How Data is stored on a Magnetic Disk
How Data is stored on a Magnetic Disk

How Data is organized on a Magnetic Disk:
Before the computer can use a magnetic disk to store data, the disks surface must be magnetically mapped, so that the computer can go directly to a specific point on it without searching through data. The process of mapping a disk is called formatting or initializing. 

Tracks and Sectors:
When we format a magnetic disk, the disk drive creates a set of concentric rings, called tracks required depends on the types of disk. Most high-density diskettes have 80 tracks on each side of the disk. A hard disk may have several hundred tracks on each side of each platter. The tracks are numbered from the outermost circle to the innermost, starting with zero.
Track and Sectors: Surface (Platter) - Spins Continuously
Track and Sectors: Surface (Platter) - Spins Continuously

Each track on a disk also split into smaller parts. In both diskettes and hard disks, a sector can store up to 512 bytes (0.5KB). All these sectors on the disk are numbered in one long sequence, so that the computer can access each small area on the disk with a unique number.
Regardless of physical size, all of a diskette’s sectors hold the same number of bytes; that is, the shortest, innermost sectors hold the same amount of data as the longest, outermost sectors.
Of course, a diskette’s allocation of sectors per tracks is somewhat wasteful, because the longer outer tracks could theoretically store more data than the shorter inner tracks. For this reason, most hard disks allocate more sectors to the longer tracks on the disk’s surface.

Because files are not usually a size that is an even multiple of 512 bytes, some sectors contain unused space after the end of the file. In addition, the windows operating system allocates a group of sectors. Called a cluster, to each file stored on a disk. Cluster sizes vary, depending on the size and type of the disk, but they can range 4 sectors for diskettes to 64 sectors for some hard disks.
Cluster Diagram
Cluster Diagram

A sector is the smallest unit with which any disk drive can work. Each bit and bite within a sector can have different values, but the drive can read or write only whole sectors at a time. If the computer needs to change just 1 byte out of 512, it must rewrite the entire sector.

How the Operating System Finds Data on a Disk:
A computer’s operating system can locate data on a disk because each track and sector is labeled, and the location of all data is kept in a special log on the disk. The labeling of tracks and sectors is called logical formatting. A commonly used logical format performed by Windows creates four disk areas.

The Master Boot Record:
The master boot record is a program that runs when we first start the computer. This program determines whether the disk has the basic components that are necessary to run the operating system successfully. If the program determines that the required files are present and the disk has a valid format, it transfers control to one of the operating system programs that continues the process of starting up. This process is called booting –because the boot program makes the computer “pull itself up by its own bootstraps”. The boot record also describes other disk characteristic, such as the number of types per sector and the number of sectors per track- information that the operating system needs to access the data area of the disk.

The file allocation table:
The file allocation table (FAT) is a log that records the location of each file and the status of each sector. When we write a file to a disk, the operating system checks the FAT for an open area, stores the file, and then identities the file and its location in the FAT.

The Root Folders:
Users do not see the information listed in the FAT, but they often use the information. A folder, also called a directory, is a tool for organizing files on a disk. The top folder on any disk is known as the root.

The Data Area:
The part of the disk that remains free after the boot sectors, FAT, and root folder have been created is called the data area, because that is where data files are actually stored.
Optical Storage Devices CD-ROM
 A CD-ROM drive reads digital data (whenever computer data and audio) from a spinning disk by focusing a laser on the disk’s surface. Some areas of the disk reflect the laser light into a sensor, and other areas scatter the light. A spot that reflects the laser beam into the sensor is interpreted as a 1, and the absence of a reflection is interpreted as a 0.
How a CD-ROM drive reads data from the surface of a compact disk
How a CD-ROM drive reads data from the surface of a compact disk

Data is laid out on a CD-ROM disk in a long, continuous spiral that starts at the outer edge and winds inward to the center. Data is stored in the form of lands, which are flat areas on the metal surface, and pits, which are depressions or hollows. A land reflects the laser light into the sensor and a pit scatters the light. On a full CD-ROM, the spiral of data stretches almost three miles long!
How Writable CD Works
How Writable CD Works

Compared to hard disk drives, CD-ROM drives are quite slow, in part because the laser reads pits and lands one bit at a time. Another reason has to do with the changing rotational aped of the disk. Like a track on a magnetic disk, the of an optical disk is split into sectors. However, the sectors are laid out differently than they are on magnetic disks.

Today’s new PCs feature a built-in digital video disk read-only memory (DVD-ROM) drive rather than a standard CD-ROM drive. DVD-ROM achieves such high storage capacities by using both sides of disk, by using special data – compression technologies, and by using extremely small tracks for storing data.
The latest generation of DVD-ROM disks actually uses layers of data tracts, effectively doubling their capacity. The device’s laser beam can read data from the first layer and then look through it to read data from the second layer.

Physical Structure of DVD-ROM
DVDs exist in both “single layer” and “duel layer” (DL) versions. Duel layer discs are made up of a translucent, gold – based semi-reflective layer and an opaque, silver-based reflective layer, separated by a bonding layer. In order to read both these layers, the drive has a layer which can change its intensity by modifying its frequency and focus.
Physical Structure of DVD-ROM
Physical Structure of DVD-ROM

·            With low intensity the beam is reflected off the outer gold surface.
·       With higher intensity, the beam passes through the first layer is reflected off the inner silver surface.