1 Chapter 6 Secondary Storage. 2 Why Use Secondary Storage n Main memory, or primary storage, is...

45
1 Chapter 6 Secondary Storage

Transcript of 1 Chapter 6 Secondary Storage. 2 Why Use Secondary Storage n Main memory, or primary storage, is...

Page 1: 1 Chapter 6 Secondary Storage. 2 Why Use Secondary Storage n Main memory, or primary storage, is both limited and volatile. This means that programs and.

1

Chapter 6Secondary Storage

Page 2: 1 Chapter 6 Secondary Storage. 2 Why Use Secondary Storage n Main memory, or primary storage, is both limited and volatile. This means that programs and.

2

Why Use Secondary Storage Main memory, or primary storage, is both limited and

volatile. This means that programs and data stored in main memory will disappear when the computer is turned off.

Secondary storage hold data and programs that are not currently being used by the processor, and provides permanent, nonvolatile storage of data and programs.

Other common terms for secondary storage are external storage and auxiliary storage.

Page 3: 1 Chapter 6 Secondary Storage. 2 Why Use Secondary Storage n Main memory, or primary storage, is both limited and volatile. This means that programs and.

3

Advantages of Secondary Storage Convenient Economical Reliable Large Capacity

Page 4: 1 Chapter 6 Secondary Storage. 2 Why Use Secondary Storage n Main memory, or primary storage, is both limited and volatile. This means that programs and.

4

The Hierarchy of Data Organization:

Bits to Databases

Page 5: 1 Chapter 6 Secondary Storage. 2 Why Use Secondary Storage n Main memory, or primary storage, is both limited and volatile. This means that programs and.

5

Objectives1. To describe and illustrate the relationships

between the levels of the hierarchy of data organization.

2. Define the terms: character, field, record, and file. Give an example of each.

3. Explain the purpose of the ”key field.”

Page 6: 1 Chapter 6 Secondary Storage. 2 Why Use Secondary Storage n Main memory, or primary storage, is both limited and volatile. This means that programs and.

6

Hierarchy of Data Logical data structure - how data items are related or

organized to have meaning. Physical data structure - how data items are stored

and located by the computer for processing. Data is organized into several levels of complexity.

There are six levels in this hierarchy:

· Bits· Bytes (characters)· Fields· Records· Files· Databases

Page 7: 1 Chapter 6 Secondary Storage. 2 Why Use Secondary Storage n Main memory, or primary storage, is both limited and volatile. This means that programs and.

7

Bit and Character A character is the smallest unit of usable data. It

is a single letter, numeral, punctuation mark, or other symbol (such as $ or %), and is represented within the computer as a unique combination of bits (byte).

A typically, a character code consists of seven or eight bits.

Whereas the bit is the basic unit of primary and secondary storage, the character is the basic unit for human perception.

Page 8: 1 Chapter 6 Secondary Storage. 2 Why Use Secondary Storage n Main memory, or primary storage, is both limited and volatile. This means that programs and.

8

Field Just as single letters are combined to form

words, characters are combined to form fields. A field is a single item of information (such as a

name) composed of a sequence of characters. Fields contain specific kinds of information, such

as employee names, social security numbers, addresses, etc.

Whereas the field is the general reference, the specific content of a field is called the data item.

For example, a social security number is a field, but the actual number, 7111954, is a data item.

Page 9: 1 Chapter 6 Secondary Storage. 2 Why Use Secondary Storage n Main memory, or primary storage, is both limited and volatile. This means that programs and.

9

Record A record is a group of related fields that are

treated as a unit.

A typical payroll record for an individual employee might include fields such as name, social security number, address, gross pay, taxes withheld, etc.

Page 10: 1 Chapter 6 Secondary Storage. 2 Why Use Secondary Storage n Main memory, or primary storage, is both limited and volatile. This means that programs and.

10

File A file is a collection of records having one or

more common characteristics or functions.

A file describes a class of items, while a record describes a particular member or element of that class.

The employee file contains a record for each employee. An inventory file contains a record for each inventory item.

In a computer system, files are usually stored on some auxiliary storage media such as magnetic tape or disks.

Page 11: 1 Chapter 6 Secondary Storage. 2 Why Use Secondary Storage n Main memory, or primary storage, is both limited and volatile. This means that programs and.

11

Database The database is the data resource for every

computer-based information system.

A database is a collection of files that are in some way logically related to one another.

In a database, the data are integrated and related so that data redundancy is minimized.

Page 12: 1 Chapter 6 Secondary Storage. 2 Why Use Secondary Storage n Main memory, or primary storage, is both limited and volatile. This means that programs and.

12

Database (continued)

For example, if records are kept in a traditional file environment at a university and a student moves, his or her address must be changed in all files that maintain address data (registrar, financial aid, health services, and so on).

In a database, employee-address data are stored only once and are made available to all departments. Therefore, only one update is needed.

Page 13: 1 Chapter 6 Secondary Storage. 2 Why Use Secondary Storage n Main memory, or primary storage, is both limited and volatile. This means that programs and.

13

Figure 4.1 summarizes a hierarchy of data.

Page 14: 1 Chapter 6 Secondary Storage. 2 Why Use Secondary Storage n Main memory, or primary storage, is both limited and volatile. This means that programs and.

14

0, 1 Bits

A Characters (Bytes)

Dr. Mahmoud Wahdan Fields (Data elements)

Wahdan 202-111-1 … $1200 Records

Wahdan Noha Waleed Wael Islam Files

Employee

master

Inventory

master

Customer

master

… Supplier

master

database

Figure 4.1 Data Hierarchy

Page 15: 1 Chapter 6 Secondary Storage. 2 Why Use Secondary Storage n Main memory, or primary storage, is both limited and volatile. This means that programs and.

15

Hierarchy of Data: An Example

Page 16: 1 Chapter 6 Secondary Storage. 2 Why Use Secondary Storage n Main memory, or primary storage, is both limited and volatile. This means that programs and.

16

Key field A key field is a particular field within a record that

is used to identify and locate individual records within a file.

What distinguishes a key field from any other field is its use, and not how it is stored.

Page 17: 1 Chapter 6 Secondary Storage. 2 Why Use Secondary Storage n Main memory, or primary storage, is both limited and volatile. This means that programs and.

17

Key field A record may be part of more than one file if it

contains more than one key field.

For example, a particular record may be part of the personal file using the employee name as the key. At the same, the record may also be part of the payroll file using the social security number as the key.

A key field may be either alphabetic (as a name) or numeric (as a social security number).

Page 18: 1 Chapter 6 Secondary Storage. 2 Why Use Secondary Storage n Main memory, or primary storage, is both limited and volatile. This means that programs and.

18

Data Storage and Retrieval Sequential access - data records are accessed one

record after another, generally in the order in which they were stored.

Random access - data records are accessed (based on their relative positions in the file) in any order, without regard to which record was most recently accessed.

Indexed sequential access - data records can be accessed either sequentially or randomly (based on their key field values).

Page 19: 1 Chapter 6 Secondary Storage. 2 Why Use Secondary Storage n Main memory, or primary storage, is both limited and volatile. This means that programs and.

19

Sequential File Organization/Accessing

Page 20: 1 Chapter 6 Secondary Storage. 2 Why Use Secondary Storage n Main memory, or primary storage, is both limited and volatile. This means that programs and.

20

Random File Organization/Accessing

Page 21: 1 Chapter 6 Secondary Storage. 2 Why Use Secondary Storage n Main memory, or primary storage, is both limited and volatile. This means that programs and.

21

Indexed File Organization/Accessing

Page 22: 1 Chapter 6 Secondary Storage. 2 Why Use Secondary Storage n Main memory, or primary storage, is both limited and volatile. This means that programs and.

22

Magnetic Disk Storage

Page 23: 1 Chapter 6 Secondary Storage. 2 Why Use Secondary Storage n Main memory, or primary storage, is both limited and volatile. This means that programs and.

23

Magnetic Disks Magnetic disks are the most common type of

secondary storage technology. Because they may be accessed sequentially or randomly, magnetic disks are often called direct-access storage devices (DASDs).

There are two main types of magnetic disks: hard disks and diskettes.· Hard disks are platters that are either fixed (permanently

installed in the computer system) or removable.· A diskette, also called a floppy disk, is a removable storage

medium made of Mylar plastic.

Page 24: 1 Chapter 6 Secondary Storage. 2 Why Use Secondary Storage n Main memory, or primary storage, is both limited and volatile. This means that programs and.

24

Hard Disks for Large Systems Hard disks usually consist of multiple platters

mounted on a shaft and housed in a container called a disk pack.

Disks packs come in both removable and nonremovable forms.

· Removable disk packs are normally stored off-line and loaded into the computer system when needed.

· Nonremovable disk packs are permanently installed and sealed, making them much less vulnerable to contamination.

Page 25: 1 Chapter 6 Secondary Storage. 2 Why Use Secondary Storage n Main memory, or primary storage, is both limited and volatile. This means that programs and.

25

Hard Disks for Microcomputers The hard disk is a vital part of a microcomputer.

Without the 200 MB to 1 GB drives that are typical today, applications would not be nearly as powerful and the data they use would be much less plentiful.

Hard cards are hard disks that are attached to add-in circuit boards that fit in a slot inside your computer.

Bernoulli drives (or other similar products) are considered to be removable hard disks. They are much slower than fixed hard drives, but have much greater capacity than floppy diskettes.

Page 26: 1 Chapter 6 Secondary Storage. 2 Why Use Secondary Storage n Main memory, or primary storage, is both limited and volatile. This means that programs and.

26

Locating Data on Disks

Page 27: 1 Chapter 6 Secondary Storage. 2 Why Use Secondary Storage n Main memory, or primary storage, is both limited and volatile. This means that programs and.

27

Accessing Data on a Disk

Page 28: 1 Chapter 6 Secondary Storage. 2 Why Use Secondary Storage n Main memory, or primary storage, is both limited and volatile. This means that programs and.

28

Reading and Writing Data On a hard disk, data is written and read by a

read/write head that “floats” on a cushion of air very close to the disk surface. On a diskette, the read/write head actually touches the disk surface.

Read/write heads are attached to a device called an access arm. The access arm is, in turn, attached to an actuator mechanism that moves the arm assembly in and out over the disk tracks.

Page 29: 1 Chapter 6 Secondary Storage. 2 Why Use Secondary Storage n Main memory, or primary storage, is both limited and volatile. This means that programs and.

29

Disk Access Time The time it takes between entering a request for data

and receiving the data is called the disk access time.

The time is dependent on three factors:

· Seek time - the time that the read/write head takes to move the desired track or cylinder.

· Rotational delay time - the time it takes to complete the alignment.

· Transmission time - the time it takes to read the data from disk and transfer it to the computer.

Page 30: 1 Chapter 6 Secondary Storage. 2 Why Use Secondary Storage n Main memory, or primary storage, is both limited and volatile. This means that programs and.

30

Why Hard Disks are Sealed

Page 31: 1 Chapter 6 Secondary Storage. 2 Why Use Secondary Storage n Main memory, or primary storage, is both limited and volatile. This means that programs and.

31

Magnetic Tape Storage

Page 32: 1 Chapter 6 Secondary Storage. 2 Why Use Secondary Storage n Main memory, or primary storage, is both limited and volatile. This means that programs and.

32

Magnetic Tape Storage Magnetic tape was developed to replace the earlier

bulky, expensive method of storing data on punched cards. Today, it is used to store large, seldom used data files and for backup.

A backup is the copy of data or programs that is stored in a safe location to ensure that it’s preserved in case the original is damaged or destroyed.

Page 33: 1 Chapter 6 Secondary Storage. 2 Why Use Secondary Storage n Main memory, or primary storage, is both limited and volatile. This means that programs and.

33

Types of Magnetic Tape Storage Reel-to-reel tapes, which look like audio tapes, are

typically 1/2” wide with lengths ranging from 200 to 3600 feet. Reel-to-reel tapes use two reels: the supply reel and the take-up reel that is usually mounted permanently in the tape drive.

Cassette tapes look like small versions of reel-to-reel, but with both reels contained in a plastic case. They are used on a variety of computer systems.

Cartridge tapes are really closer to the reel-to-reel because the tape is wrapped around a supply reel contained in a plastic case.

Page 34: 1 Chapter 6 Secondary Storage. 2 Why Use Secondary Storage n Main memory, or primary storage, is both limited and volatile. This means that programs and.

34

Magnetic Tape Drive

Page 35: 1 Chapter 6 Secondary Storage. 2 Why Use Secondary Storage n Main memory, or primary storage, is both limited and volatile. This means that programs and.

35

Tape Cassette

Page 36: 1 Chapter 6 Secondary Storage. 2 Why Use Secondary Storage n Main memory, or primary storage, is both limited and volatile. This means that programs and.

36

Tape Cartridge

Page 37: 1 Chapter 6 Secondary Storage. 2 Why Use Secondary Storage n Main memory, or primary storage, is both limited and volatile. This means that programs and.

37

Representing Data on Tape There are two types of tape formats.

In the nine-track format, one byte of data is recorded vertically across the tape plus the error-detecting parity bit.

In serpentine formats, the bits are recorded horizontally along anywhere from 18 to 32 tracks.

Page 38: 1 Chapter 6 Secondary Storage. 2 Why Use Secondary Storage n Main memory, or primary storage, is both limited and volatile. This means that programs and.

38

Bits on the Tape

Page 39: 1 Chapter 6 Secondary Storage. 2 Why Use Secondary Storage n Main memory, or primary storage, is both limited and volatile. This means that programs and.

39

Other Storage Media

Page 40: 1 Chapter 6 Secondary Storage. 2 Why Use Secondary Storage n Main memory, or primary storage, is both limited and volatile. This means that programs and.

40

Storage Media Capacities

Page 41: 1 Chapter 6 Secondary Storage. 2 Why Use Secondary Storage n Main memory, or primary storage, is both limited and volatile. This means that programs and.

41

Mass Storage Systems Mass storage systems (MSS) are capable of storing as

much as 500 Gigabytes (500+ billion characters).

MSSs combine the low cost of magnetic tape with the direct-access capabilities of magnetic disks. Because they are also relatively slow and hard to maintain, their days are numbered.

Page 42: 1 Chapter 6 Secondary Storage. 2 Why Use Secondary Storage n Main memory, or primary storage, is both limited and volatile. This means that programs and.

42

Optical Disk Storage One of the newest forms of high-density storage is

optical disk storage, of which there are three basic technologies: CD-ROM, WORM and magneto-optical.

Optical disk storage takes advantage of the precision of laser technology to place bits on the storage media with a very high density.

It offers several advantages over magnetic tape and magnetic disks, including greater data density, lower expense (bit-for-bit), extreme durability and little danger of data loss due to mechanical problems.

Page 43: 1 Chapter 6 Secondary Storage. 2 Why Use Secondary Storage n Main memory, or primary storage, is both limited and volatile. This means that programs and.

43

CD-ROM CD-ROM (compact disk

read-only-memory) disks are produced by using a focused laser to burn pits into the disk surface. To read the data, a laser-photodetector mechanism is used.

One CD-ROM can store over 500 MB of data, more than a whole encyclopedia.

Page 44: 1 Chapter 6 Secondary Storage. 2 Why Use Secondary Storage n Main memory, or primary storage, is both limited and volatile. This means that programs and.

44

WORM A type of optical storage that allows data to be written

to a disk once, but read as many times as the user wishes, is called a write once, read many (WORM) disk.

WORM disks are made of plastic or glass covered by a thin layer of metal that a laser beam can mark. To write data, the laser burns a hole into, or raises a bubble on, the surface of the metal.

Reading the data requires a laser-photodetector mechanism similar to that used on the CD-ROM.

Page 45: 1 Chapter 6 Secondary Storage. 2 Why Use Secondary Storage n Main memory, or primary storage, is both limited and volatile. This means that programs and.

45

Magneto-Optical The most popular erasable optical disk technology is

called magneto-optical. As its name implies, this technology makes use of both magnetics and laser optics.

Magnetic particals (similar to that used on disk drive and tape surfaces) are embedded in a material that changes from a solid to a plastic when enough heat is applied - by a laser. Data is written when a magnet aligns the embedded particles while the material is in it’s plastic state.

Reading the data requires another laser-photodetector device.