Section 13.2 – Secondary storage management (Former Student’s Note)

Preview:

DESCRIPTION

The use of secondary storage is one of the important characteristics of a DBMS, and secondary storage is almost exclusively based on magnetic disks: Use Example 13.1 Disks:

Citation preview

Section 13.2 – Secondary storage management

(Former Student’s Note)

• 13.2 Disks

• 13.2.1 Mechanics of Disks • 13.2.2 The Disk Controller • 13.2.3 Disk Access Characteristics

Index

• The use of secondary storage is one of the important characteristics of a DBMS, and secondary storage is almost exclusively based on magnetic disks: Use Example 13.1

Disks:

Structure of a Disk

• 0’s and 1’s are represented by different patterns in the magnetic material.

• A common diameter for the disk platters is 3.5 inches.

Data in Disk

• Two principal moving pieces of hard drive1- Head Assembly2- Disk Assembly

• Disk Assembly has 1 or more circular platters that rotate around a central spindle.

• Platters are covered with thin magnetic material

Mechanics of Disks

Top View of Disk Surface

• Tracks are concentric circles on a platter.

• Tracks are organized into sectors which are segments of circular platter.

• Sectors are indivisible as far as errors are concerned.

• Blocks are logical data transfer units.

Mechanics of Disks

• Control the actuator to move head assembly

• Selecting the surface from which to read or write

• Transfer bits from desired sector to main memory

Disk Controller

Simple Single Processor Computer

• Seek time: The disk controller positions the head assembly at the cylinder containing the track on which the block is located. The time to do so is the seek time. The force to move disk controller is about 5g (gravitational force)

• Rotational latency: The disk controller waits while the first sector of the block moves under the head. This time is called the rotational latency.

Disk Access characteristics

• Transfer time: All the sectors and the gaps between them pass under the head, while the disk controller reads or writes data in these sectors. This delay is called the transfer time.

• Latency of the disk: The sum of the seek time, rotational latency, transfer time is the latency of the time.

Disk Access characteristics

• Example 13.1 Megatron 747• 16 surfaces• 216 tracks per surface• 28 (average) sectors per track• 212 bytes per sector• Block=4 sectors• 1 mega bytes per track

Disks:

• Example 13.1• Megatron 747 Disk• If blocks are 214 bytes or 16384 bytes,

then one block uses 4 consecutive sectors, and there are (on the average) 32 blocks per track.

Disks:

• Example 13.2• The disk rotates at 7200 rpm; i.e., it

makes one rotation in 8.33 millisecond.• To move the head assembly between

cylinders take one millisecond to start and stop. Plus one millisecond for every 4000 cylinders traveled. Thus the head moves one track in 1.00025

Disks:

• Example 13.2milliseconds and move from the

innermost to outermost track, a distance of 65, 536 tracks, in about 17.38 millisecond

• Gaps occupy 10% of the space around a track.

• Take two rotations to read whole track

Disks: