Seminar Topics & Project Ideas On Computer Science Electronics Electrical Mechanical Engineering Civil MBA Medicine Nursing Science Physics Mathematics Chemistry ppt pdf doc presentation downloads and Abstract

Full Version: Secondary Storage Devices: Magnetic Disks Optical Disks Floppy Disks Magnetic Tapes
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Secondary Storage Devices: Magnetic Disks Optical Disks Floppy Disks Magnetic Tapes
[attachment=28400]
Secondary Storage Devices
Two major types of secondary storage devices:
Direct Access Storage Devices (DASDs)
Magnetic Discs Hard disks (high capacity, low cost, fast) Floppy disks (low capacity, lower cost, slow)
Optical Disks CD-ROM = (Compact disc, read-only memory
Serial Devices
Magnetic tapes (very fast sequential access)
Storage and Files
Storage has major implications for DBMS design!
READ: transfer data from disk to main memory (RAM).
WRITE: transfer data from RAM to disk.
Both operations are high-cost operations, relative to in-memory operations, so DB must be planned carefully!
Why Not Store Everything in Main Memory?
Costs too much: Cost of RAM about 100 times the cost of the same amount of disk space, so relatively small size.
Main memory is volatile.
Typical storage hierarchy:
Main memory (RAM) (primary storage) for currently used data.
Disk for the main database (secondary storage).
Tapes for archiving older versions of the data (tertiary storage).
Storage Hierarchy
Primary storage : random access memory (RAM)
typical capacity a number of GB
cost per MB $2-3.00
typical access time 5ns to 60ns
Secondary storage: magnetic disk/ optical devices/ tape systems
typical capacity a number of 100GB for fixed media;  for removable
cost per MB $0.01 for fixed media, more for removable
typical access time 8ms to 12ms for fixed media, larger for removable
Memory Hierarchy
At the primary storage level, the memory hierarchy includes, at the most expensive end’ cache memory, which is a static RAM (Random Access Memory).
The next level of primary storage is DRAM (Dynamic RAM), The advantage of DRAM is its low cost, lower speed compared with static RAM.
Programs normally reside and execute in DRAM.
Now that personal computers and workstations have 10s of gigabytes of data in DRA, in some cases, entire databases can be kept in the main memory (with a backup copy on magnetic disk), leading to main memory databases.
Memory Hierarchy-flash memory
Flash memory, since 1988 it has become common, particularly because it is nonvolatile, using EEPROM (Electrically Erasable Programmable Read-Only Memory) technology. Its life is 10,000-1,000,000 times erase… Read/write is fast, but erase is slow…
Therefore special arrangements are made for the file system, regarding file delete or update.
Capacities up to 128 GB has been realized todate.
Magnetic Disks
Bits of data (0’s and 1’s) are stored on circular magnetic platters called disks.
A disk rotates rapidly (& never stops).
A disk head reads and writes bits of data as they pass under the head.
Often, several platters are organized into a disk pack (or disk drive).
Disk Controller
Disk controllers: typically embedded in the disk drive, which acts as an interface between the CPU and the disk hardware.
The controller has an internal cache (typically a number of MBs) that it uses to buffer data for read/write requests.
Accessing Data
When a program reads a byte from the disk, the operating system locates the surface, track and sector containing that byte, and reads the entire sector into a special area in main memory called buffer.
The bottleneck of a disk access is moving the read/write arm.
So it makes sense to store a file in tracks that are below/above each other on different surfaces, rather than in several tracks on the same surface.
Cylinders
A cylinder is the set of tracks at a given radius of a disk pack.
i.e. a cylinder is the set of tracks that can be accessed without moving the disk arm.
All the information on a cylinder can be accessed without moving the read/write arm.
Estimating Capacities
Track capacity = # of sectors/track * bytes/sector
Cylinder capacity = # of tracks/cylinder * track capacity
Drive capacity = # of cylinders * cylinder capacity
Number of cylinders = # of tracks in a surface
Exercise
Store a file of 20000 records on a disk with the following characteristics:
# of bytes per sector = 512
# of sectors per track = 40
# of tracks per cylinder = 11
# of cylinders = 1331
Q1. How many cylinders does the file require if each data record requires 256 bytes?
Q2. What is the total capacity of the disk?
Suppose we want to read consecutively the sectors of a track in order: sectors 1, 2,…11.
Suppose two consecutive sectors cannot be read in non-interleaving case.
How many revolutions to read the disk?
Without interleaving
With 3:1 interleaving
Note: nowadays most disk controllers are fast enough so interleaving is not common...