29
1 Secondary Storage Management Submitted by: Sathya Anandan(ID:123)

1 Secondary Storage Management Submitted by: Sathya Anandan(ID:123)

Embed Size (px)

Citation preview

Page 1: 1 Secondary Storage Management Submitted by: Sathya Anandan(ID:123)

1

Secondary Storage Management

Submitted by: Sathya Anandan(ID:123)

Page 2: 1 Secondary Storage Management Submitted by: Sathya Anandan(ID:123)

2

Topics Covered in this Presentation:

The Memory Hierarchy1.The Memory Hierarchy2.Transfer of Data Between Levels3.Volatile and Nonvolatile Storage4.Virtual Memory

Disks1.Mechanics of Disks2.The Disk Controller3.Disk Access Characteristics

Page 3: 1 Secondary Storage Management Submitted by: Sathya Anandan(ID:123)

3

Secondary Storage Management:

Database systems always involve secondary storage like the disks and other devices that store large amount of data that persists over time.

Page 4: 1 Secondary Storage Management Submitted by: Sathya Anandan(ID:123)

4

The Memory Hierarchy:

A typical computer system has several different components in which data may be stored.

These components have data capacities ranging over at least seven orders of magnitude and also have access speeds ranging over seven or more orders of magnitude.

Page 5: 1 Secondary Storage Management Submitted by: Sathya Anandan(ID:123)

5

The Memory hierarchy from the text book as follows:

Page 6: 1 Secondary Storage Management Submitted by: Sathya Anandan(ID:123)

6

Cache:

It is the lowest level of the hierarchy is a cache. Cache is found on the same chip as the microprocessor itself, and additional level-2 cache is found on another chip.

Data and instructions are moved to cache from main memory when they are needed by the processor.

Cache data can be accessed by the processor in a few nanoseconds.

Page 7: 1 Secondary Storage Management Submitted by: Sathya Anandan(ID:123)

7

Main Memory:

In the center of the action is the computer's main memory. We may think of everything that happens in the computer - instruction executions and data manipulations - as working on information that is resident in main memory

Typical times to access data from main memory to the processor or cache are in the 10-100 nanosecond range

Page 8: 1 Secondary Storage Management Submitted by: Sathya Anandan(ID:123)

8

Secondary Storage:

Essentially every computer has some sort of secondary storage, which is a form of storage that is both significantly slower and significantly more capacious than main memory.

The time to transfer a single byte between disk and main memory is around 10 milliseconds.

Page 9: 1 Secondary Storage Management Submitted by: Sathya Anandan(ID:123)

9

Tertiary Storage:

As capacious as a collection of disk units can be, there are databases much larger than what can be stored on the disk(s) of a single machine, or even of a substantial collection of machines.

Tertiary storage devices have been developed to hold data volumes measured in terabytes.

Page 10: 1 Secondary Storage Management Submitted by: Sathya Anandan(ID:123)

10

Tertiary storage is characterized by significantly higher read/write times than secondary storage, but also by much larger capacities and smaller cost per byte than is available from magnetic disks.

Page 11: 1 Secondary Storage Management Submitted by: Sathya Anandan(ID:123)

11

Transfer of Data Between Levels:

Normally, data moves between adjacent levels of the hierarchy.

At the secondary and tertiary levels, accessing the desired data or finding the desired place to store data takes a great deal of time, so each level is organized to transfer large amount of data or from the level below, whenever any data at all is needed.

Page 12: 1 Secondary Storage Management Submitted by: Sathya Anandan(ID:123)

12

The disk is organized into disk blocks and the entire blocks are moved to or from a continuous section of main memory called a buffer.

Page 13: 1 Secondary Storage Management Submitted by: Sathya Anandan(ID:123)

13

Volatile and Nonvolatile Storage:

A volatile device "forgets" what is stored in it when the power goes off.

A nonvolatile device, on the other hand, is expected to keep its contents intact even for long periods when the device is turned off or there is a power failure.

Page 14: 1 Secondary Storage Management Submitted by: Sathya Anandan(ID:123)

14

Magnetic and optical materials hold their data in the absence of power.Thus, essentially all secondary and tertiary storage devices are nonvolatile. On the other hand main memory is generally volatile.

Page 15: 1 Secondary Storage Management Submitted by: Sathya Anandan(ID:123)

15

Virtual Memory:

When we write programs the data we use, variables of the program, files read and so on occupies a virtual memory address space.

Many machines use a 32-bit address space; that is, there are 2(pow)32 bytes or 4 gigabytes.

Page 16: 1 Secondary Storage Management Submitted by: Sathya Anandan(ID:123)

16

The Operating System manages virtual memory, keeping some of it in main memory and the rest on disk.Transfer between memory and disk is in units of disk blocks.

Page 17: 1 Secondary Storage Management Submitted by: Sathya Anandan(ID:123)

17

Disks:

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

Page 18: 1 Secondary Storage Management Submitted by: Sathya Anandan(ID:123)

18

Mechanics of Disks:

The two principal moving pieces of a disk drive are a disk assembly and a head assembly.

The disk assembly consists of one or more circular platters that rotate around a central spindle

The upper and lower surfaces of the platters are covered with a thin layer of magnetic material, on which bits are stored.

Page 19: 1 Secondary Storage Management Submitted by: Sathya Anandan(ID:123)

19

A typical disk format from the text book is shown as below:

Page 20: 1 Secondary Storage Management Submitted by: Sathya Anandan(ID:123)

20

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. The disk is organized into tracks, which are concentric circles on a single platter.The tracks that are at a fixed radius from a center, among all the surfaces form one cylinder.

Page 21: 1 Secondary Storage Management Submitted by: Sathya Anandan(ID:123)

21

Top View of a disk surface from the text is as shown below:

Page 22: 1 Secondary Storage Management Submitted by: Sathya Anandan(ID:123)

22

Tracks are organized into sectors, which are segments of the circle separated by gaps that are magnetized to represent either 0’s or 1’s. The second movable piece the head assembly, holds the disk heads.

Page 23: 1 Secondary Storage Management Submitted by: Sathya Anandan(ID:123)

23

The Disk Controller:

One or more disk drives are controlled by a disk controller, which is a small processor capable of:

Controlling the mechanical actuator that moves the head assembly to position the heads at a particular radius.

Transferring bits between the desired sector and the main memory.

Page 24: 1 Secondary Storage Management Submitted by: Sathya Anandan(ID:123)

24

Selecting a surface from which to read or write, and selecting a sector from the track on that surface that is under the head.An example of single processor is shown in next slide.

Page 25: 1 Secondary Storage Management Submitted by: Sathya Anandan(ID:123)

25

Simple computer system from the text is shown below:

Page 26: 1 Secondary Storage Management Submitted by: Sathya Anandan(ID:123)

26

Disk Access Characteristics:

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.

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

Page 27: 1 Secondary Storage Management Submitted by: Sathya Anandan(ID:123)

27

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.The sum of the seek time, rotational latency, transfer time is the latency of the time.

Page 28: 1 Secondary Storage Management Submitted by: Sathya Anandan(ID:123)

28

Any Questions?

Page 29: 1 Secondary Storage Management Submitted by: Sathya Anandan(ID:123)

29

Reference:

Database SystemsThe complete Book-Second

Edition