CHAPTER 5. Next Exit Main Memory and Backing Storage Devices... Main Memory and Backing Storage...

41
CHAPTER 5

Transcript of CHAPTER 5. Next Exit Main Memory and Backing Storage Devices... Main Memory and Backing Storage...

CHAPTER 5CHAPTER 5

NextNext ExitExit

Main Memory and BackingMain Memory and BackingStorage Devices ...Storage Devices ...

Main Memory and BackingMain Memory and BackingStorage Devices ...Storage Devices ...

Main memory temporarily stores programs and data that are being processed.

Backing store, also called secondary storage, stores programs and data when they are not being used.

NextNext ExitExit

Main Memory and BackingMain Memory and BackingStorage DevicesStorage Devices

Main Memory and BackingMain Memory and BackingStorage DevicesStorage Devices

5.1 Main memory5.1 Main memory

5.2 Backing storage devices5.2 Backing storage devices

PrevPrev

NextNext ExitExitPrevPrev5.1 Main memory

The main memory can be thought of as a series of storage locations. Each location has a unique address, counting from zero upwards. The address is called memory address. The main memory is connected to the CPU by buses.

When the CPU wants to access a particular memory location, it sends the address to the memory on an address bus. The data held in that location are returned to the CPU on the data bus.

Main memory ...

• How are data stored in the main memory?

Main memory

• Memory sizes

• Semiconductor chips

• Types of memory

NextNext ExitExitPrevPrev5.1 Main memory

• Buses

• Data representation

Data Representation

NextNext ExitExitPrevPrev5.1 Main memory

In computer, the number system has TWO unique digits, 0 and 1. Each on or off digit value is called a BIT (short for Binary Digit).

Bits are the smallest unit of data the computer can handle.

Eight Bits are grouped together as a unit, they are called a BYTE.

A Byte can represent 28 (256) different individual characters including numbers, uppercase and lowercase letters of the alphabet, punctuation marks, and other characters such as the letter of the Greek alphabet.

Programs and data are made up of characters. They are stored in the memory character by character.

How are data stored in the main memory?

Most computer use 8-bit codes to represent each character.

NextNext ExitExitPrevPrev5.1 Main memory

Each byte is placed in a unique location in memory, called an memory address.

Memory address: holds a single byte; can be empty; has a unique identifying number.

The size of the main memory is measured by the number of bytes available for use.

Memory sizes

The memory size is restricted by the addressing capability of

the computer. In general, n address lines are required to access

2n memory locations.

NextNext ExitExitPrevPrev5.1 Main memory

A Kilobyte (KB) is equal to 210, 1024 bytes (~ 1000 bytes).

A Megabyte (MB) is equal to 220, 1024 Kilobytes (~ 100000 bytes).

A Gigabyte (GB) is equal to 230, 1024 Megabytes (~ 1 billion bytes).

A Terabyte (TB) is equal to 240, (~ 1 trillion bytes).

A semiconductor memory chip is an integrated circuit (IC) that contains thousands of transistors. The transistor can represent a bit in the memory.

Semiconductor chips

NextNext ExitExitPrevPrev5.1 Main memory

NextNext ExitExitPrevPrev5.1 Main memory

• random access memory (RAM) -> Volatile Memory

Types of memory

• read only memory (ROM) -> Non Volatile Memory

NextNext ExitExitPrevPrev5.1 Main memory

NextNext ExitExitPrevPrev5.1 Main memory

when the computer is powered on, certain operating system files are loaded from a storage device such as a hard disk into RAM;

the contents of RAM may change as the data is processed;

multiple programs can be loaded into RAM simultaneously, provided there is enough RAM to accommodate all the programs.

Random Access Memory(RAM)

NextNext ExitExitPrevPrev5.1 Main memory

a computer only can manipulate data that is in memory.

the more RAM a computer has, the more programs and files it can work on at once, the overall performance can be enhanced.

Random Access Memory(RAM)

NextNext ExitExitPrevPrev5.1 Main memory

data stored in ROM cannot be modified;

non-volatile memory;

contains the sequence of instructions the computer follows to load the operating system and other files when you first turn the computer on.

Read only Memory(ROM)

NextNext ExitExitPrevPrev5.1 Main memory

NextNext ExitExitPrevPrev5.1 Main memory

the speed at which the processor can access data from memory directly affects how fast the computer processes data.

the speed is defined as access time. memory access time is measured in terms of a nanosecond.

Access Time

NextNext ExitExitPrevPrev5.1 Main memory

Access Time

NextNext ExitExitPrevPrev5.1 Main memory

DRAM 50 to 70 ns

SRAM 7 to 20 ns

ROM 55 to 250 ns

Hard disk 8 to 15 ms

Bits are transferred internally within the circuitry of the computer along electrical analog (called a bus)

Buses are used to transfer bits from input devices to memory; from memory to the CPU; from the CPU to memory; from memory to output or storage devices.

Consists of two parts data bus (transfers actual data) address bus (transfers information about where the data

should go into the memory)

Buses

NextNext ExitExitPrevPrev5.1 Main memory

determines the number of bits that can be transmitted at one time

The larger the number of bits handled by the bus, the faster the computer transfers data.

Bus Width

NextNext ExitExitPrevPrev5.1 Main memory

the number of bits the CPU can process at a given time.

computer with larger word size can process more data in the same amount of time than computers with a smaller word size.

Word Size

NextNext ExitExitPrevPrev5.1 Main memory

Why do we need backing storage devices?

Backing/Secondary storage devices...

NextNext ExitExitPrevPrev5.2 Backing storage devices

What is backing storage device?

Some examples of backing storage device.

Pros and Cons of different backing storage devices.

Data in the main memory(except in the ROM) are lost when the machine is switched off.

Why do we need backing storage devices?

NextNext ExitExitPrevPrev5.2 Backing storage devices

Main memory is very expensive.

Data for an application program may be so large that it is physically impossible for the main memory to hold all the data.

Holds programs and data for future processing.

Backing/Secondary storage devices...

NextNext ExitExitPrevPrev5.2 Backing storage devices

Storage is nonvolatileItems in storage are retained even when power is removed from the computer.

A storage medium(media is the plural) is the physical material on which data/programs are kept.

A storage device is the mechanism used to record and retrieve items to and from a storage medium.

Backing storage devices

NextNext ExitExitPrevPrev5.2 Backing storage devices

Storage devices can function as sources of input and output.

READINGStorage device transfers data/information from a storage medium into memory.

Backing storage devices

WRITINGStorage device transfers data/information from memory to a storage medium.

NextNext ExitExitPrevPrev5.2 Backing storage devices

The speed of a storage device is defined by its access time.

•ACCESS TIME

Backing Storage Device

The capacity of a storage device is measured by the number of bytes it can hold.

NextNext ExitExitPrevPrev5.2 Backing storage devices

The minimum time it takes the device to locate a single item on a disk.

•CAPACITY

Backing storage devices

• Magnetic disk

• Magnetic tape

• Optical disk (CD-ROM)

NextNext ExitExitPrevPrev5.2 Backing storage devices

• Floppy disk

Magnetic disk

• Hard disk

• Fixed head disk

NextNext ExitExitPrevPrev5.2 Backing storage devices

A floppy disk is a portable, inexpensive storage medium that consists of a thin, circular, flexible disk with a plastic coating enclosed in a square-shaped plastic shell.

Floppy disk

NextNext ExitExitPrevPrev5.2 Backing storage devices

Formatting prepares a disk for reading and writing by organizing the disk into storage locations called tracks and sectors.

How is data stored on a Floppy disk?

NextNext ExitExitPrevPrev5.2 Backing storage devices

Floppy disk drive (FDD) is a device that can read from and write on a floppy disk.

How is data stored on a Floppy disk?

NextNext ExitExitPrevPrev5.2 Backing storage devices

Shutter is a piece of metal covers an opening in the rigid plastic shell.

Read/write head is the mechanism that actually reads items from or writes items on the floppy disk.

Do not expose the disk to excessive heat, sunlight, or cold.

Care of Floppy disk

NextNext ExitExitPrevPrev5.2 Backing storage devices

Do not place heavy objects on the disk.

Do not place disks near magnetic fields such as speakers, telephone headsets, monitors, or calculators.

Do not eat, smoke or drink near a disk.

Do not open the disk’s shutter or touch recording surface on the disk.

A track is a narrow recording band that forms a full circle on the surface of the disk.

Tracks & Sectors

NextNext ExitExitPrevPrev5.2 Backing storage devices

The disk’s storage locations then are divided into pie-shaped sections, which break tracks into small arcs called sectors.

A cluster consists of two or eight sectors. It is the smallest unit of space used to store data.

A disk’s storage capacity is determined by the density of the disk density. Higher density implies larger storage capacity.

A hard disk usually consists of several inflexible, circular disks, called platters/plates, on which items are stored electronically.

Hard disk

NextNext ExitExitPrevPrev5.2 Backing storage devices

A platter allows items to be magnetically recorded on its surface.

A read/write head uses to read/write data from/to the disk.All the read/write heads are attached to an access arm.

The platters. Read/write heads, and the mechanism for moving the heads across the surface of the disk are enclosed in an airtight, sealed case that protects the platters from contamination.

A cylinder is the location of a single track through all platters.

Hard disk

NextNext ExitExitPrevPrev5.2 Backing storage devices

Floppy disk Vs Hard disk

NextNext ExitExitPrevPrev5.2 Backing storage devices

Floppy disk Hard disk

Capacity 1.44MB 4 to 50GB

Cost Cheaper Expensive

Access time Slower faster

• hard disk spins much faster than a floppy disk• hard disk spins constantly while a floppy disk starts

spinning only when it receives a read or write command.

COMPACT DISC

NextNext ExitExitPrevPrev5.2 Backing storage devices

It can contain text, graphics, video and sound.

It can hold up to 700 MB of data, instructions and information.

COMPACT DISC DRIVE SPEED

NextNext ExitExitPrevPrev5.2 Backing storage devices

CD-ROM drive’s speed is measured by data transfer rate which is the time it takes the drive to transmit data, instructions, and information from the CD-ROM to another device.

A 40X CD-ROM drive has a data transfer rate of (40 x 150 = 6000) KB per second.

COMPACT DISC

NextNext ExitExitPrevPrev5.2 Backing storage devices

• CD-ROM

• CD-R

• CD-RW

• Reel-to-reel tape

Magnetic tape

• Cartridge tape

PrevPrev ExitExit5.2 Backing storage devices

It can store a large amount of data and information at a low cost.