Wednesday, 28 November 2012

SECONDARY STORAGE AND SYSTEM SOFTWARE



Disks 

 

  • Data is stored on a magnetic disk by controlling the direction in which small areas of the disk surface are magnetized.
  • Data is stored on a disk serially, that is, one bit at a time. 

 Organization of Disks

 

 

fixed disk

A disk drive with non-removable media.

block

A physical data record, separated on the medium from other blocks by inter-block gaps.

sector

A fixed size physical data block on a disk drive.

interblock gap

An area between data blocks which contains no data and which separates the blocks.

cylinder

The set of tracks of a disk drive which can be accessed without changing the position of the access arm.

track

The (circular) area on a disk platter which can be accessed without moving the access arm of the drive. 
  • Disk Drive Physical Structure
  • Data is recorded on each surface of the disk in sectors, which are located in concentric circles.
  • The sectors are separated by gaps which contain no data.
  • On PC disk drives, each sector contains 512 bytes of data.
  • Track and cylinder locations are determined by the physical geometry of the drive.
  • Track and cylinder numbers begin with 0.
  • Tracks are often referred to as heads.
 

 Organizing Tracks by Sector

  • Sector locations are determined by the electronics of the drive, and are identified by recorded address marks.
  • Sector numbers begin with 1.
  • Today, logically adjacent sectors are typically physically adjacent.

 Estimating Capacities and Space Needs

  • bytes/track = sectors/track * bytes/sector
  • bytes/cylinder = tracks/cylinder * bytes/track
  • bytes/drive = cylinders/drive * bytes/cylinder
  • bytes/drive = cylinders/drive * tracks/cylinder * sectors/track * bytes/sector

 File allocation

  cluster

A group of sectors handled as a unit of file allocation.

   extent

A physical section of a file occupying adjacent clusters.

   fragmentation
  

                 unused space with in a file.
                 


  

The Cost of a Disk Access
 
 

direct access device

A data storage device which supports direct access.

direct access

Accessing data from a file by record position with the file, without accessing intervening records.

access time

The total time required to store or retrieve data.

transfer time

The time required to transfer the data from a sector, once the transfer has begun.

seek time

The time required for the head of a disk drive to be positioned to a designated cylinder.

rotational delay

The time required for a designated sector to rotate to the head of a disk drive.

 

  • Access time of a disk is related to physical movement of the disk parts.
  • Disk access time has three components: seek time, rotational delay, and transfer time.
  • Seek time is affected by the size of the drive, the number of cylinders in the drive, and the mechanical responsiveness of the access arm.
  • Average seek time is approximately the time to move across 1/3 of the cylinders.
  • Rotational delay is also referred to as latency.
  • Rotational delay is inversely proportional to the rotational speed of the drive.
  • Average rotational delay is the time for the disk to rotate 180°.
  • Transfer is inversely proportional to the rotational speed of the drive.
  • Transfer time is inversely proportional to the physical length of a sector.
  • Transfer time is roughly inversely proportional to the number of sectors per track.
  • Actual transfer time may be limited by the disk interface.

 

Effect of Block Size

  • Fragmentation waste increases as cluster size increases.
  • Average access time decreases as cluster size increases.

Disk as a bottleneck

 

striping

The distribution of single files to two or more physical disk drives.

Redundant Array of Inexpensive Disks

An array of multiple disk drives which appears as a single drive to the system.

RAM disk

A virtual disk drive which actually exists in main memory.

solid state disk

A solid state memory array with an interface which responds as a disk drive.

cache

Solid state memory used to buffer and store data temporarily.

  • Several techniques have been developed to improve disk access time.
  • Striping allows disk transfers to be made in parallel.
  • There are 6 versions, or levels, of RAID technology.
  • RAID-0 uses striping.
  • RAID-0 improves access time, but does not provide redundancy.
  • RAID-1 uses mirroring, in which two drives are written with the same data.
  • RAID-1 provides complete redundancy.  If one drive fails, the other provides data backup.
  • RAID-1 improves read access time, but slows write access time.
  • RAM disks appear to programs as fast disk drives.
  • RAM disks are volatile.
  • Solid state disks appear to computer systems as fast disk drives.
  • Solid state disks are used on high performance data base systems.
  • Caching improves average access time.
  • Disk caching can occur at three levels: in the computer main memory, in the disk controller, and in the disk drive.
  • Windows operating systems use main memory caching.
  • Disk controller caching requires special hardware.
  • Most disk drives now contain caching memory.
  • With caching, writes are typically reported as complete when the data is in the cache. 
  • The physical write is delayed until later.
  • With caching, reads typically read more data than is requested, storing the unrequested data in the cache. 
  • If a read can be satisfied from data already in the cache, no additional physical read is needed.
  • Read caching works on average because of program locality. 

File System Organization

 

File Allocation Table

A table on a disk volume containing chained lists of the physical locations of all files on the volume.

index node

A data structure, associated with a file, which describes the file.

Storage as a Hierarchy

 

 Journey of a Byte

 

      

    Introduction to CD-ROM

  • A single disc can hold more than 600 megabytes of data (~ 400 books of the textbook’s size)
  • CD-ROM is read only. i.e., it is a publishing medium rather than a data storage and retrieval like magnetic disks.
  • CD-ROM Strengths: High storage capacity, inexpensive price, durability.
  • CD-ROM Weaknesses: extremely slow seek performance (between 1/2 a second to a second) ==> Intelligent File Structures are critical.
     

    Physical Organization of CD-ROM

    •  CD-ROM is a descendent of CD Audios. i.e., listening to music is sequential and does not require fast random access to data. 

    • Reading Pits and Lands: CD-ROMs are stamped from a glass master disk which has a coating that is changed by the laser beam. When the coating is developed, the areas hit by the laser beam turn into pits along the track followed by the beam. The smooth unchanged areas between the pits are called 


    CD-ROM Strengths & Weaknesses

    • Seek Performance: very bad
       
  • Data Transfer Rate: Not Terrible/Not Great

  • Storage Capacity: Great

    • Benefit: enables us to build indexes and other support structures that can help overcome some of the limitations associated with CD-ROM’s poor performance.
  • Read-Only Access: There can’t be any changes ==> File organization can be optimized.

  • No need for interaction with the user (which requires a quick response)
  •  etc..


 








 

 

No comments:

Post a Comment