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

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

Embed Size (px)

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

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

Section 13.2 – Secondary storage management

(Former Student’s Note)

Page 2: 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

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

• 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:

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

Structure of a Disk

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

• 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

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

• 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

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

Top View of Disk Surface

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

• 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

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

• 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

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

Simple Single Processor Computer

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

• 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

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

• 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

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

• 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:

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

• 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:

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

• 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:

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

• 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: