Memory Organization

37
MEMORY ORGANIZATION

description

memory organisation

Transcript of Memory Organization

Page 1: Memory Organization

MEMORY ORGANIZATION

Page 2: Memory Organization

MEMORY HIERARCHY

Auxiliary memory

Magnetic taps

Magnetic disks

I/O processor

CPU

Main memory

Cache memory

Page 3: Memory Organization

MEMORY HIERARCHY SYSTEM

It is an essential component in a digital computer -needed for storing programs and data.

Memory hierarchy system consists of

relatively faster main memory Only programs currently needed by the processor resides in main memory.

Devices that provide backup storage- Auxiliary Memory Example: Magnetic disks and tapes which is used for storing system programs, large data files and other backup

information.

Smaller and faster cache memory holds those parts of the program which are heavily used

Page 4: Memory Organization

GOAL

Goal of using memory hierarchy is to obtain the highest- possible average access speed while minimizing the total cost of the entire memory system.

Page 5: Memory Organization

MEMORY CAPACITY

2n x m n address bits = 2n addresses m data bits m is the “width” of the data path

Page 6: Memory Organization

Q: How many bits of memory are contained in a memory unit with 2MB of memory?

A: 2 = 21, M = 220, B = byte = 8 = 23

21 x 220 x 23 = 224 = 16,777,216

Page 7: Memory Organization

DATA BUS

Carries data between the CPU and memory or I/O devices Bi-directional

Data transferred “out of” the CPU for write operations Data transferred “into” the CPU for read operations

Typical sizes: 8, 16, 32, 64 lines Signal names:

D0, D1, D2, D3, etc.

Page 8: Memory Organization

ADDRESS BUS

Carries an address from the CPU to Memory or I/O devices Unidirectional

The address is always supplied by the CPU Typical sizes: 16, 20, 24 lines Signal names:

A0, A1, A2, A3, etc.

Page 9: Memory Organization

CONTROL BUS

Collection of signals for coordinating CPU activities Each signal has a unique purpose Signals are output, input, or bi-directional Typical signals

/RD (read) /WR (write CLK (clock) /IRQ (interrupt request) etc.

Page 10: Memory Organization

MEMORY ADDRESS MAP

The usage of memory space on a system is commonly depicted in a “memory map”

The height of the map is determined by the number of addresses

The width of the map is usually 8 bits E.g.,

a system with a capacity of 216 bytes…

Page 11: Memory Organization
Page 12: Memory Organization

MEMORY UNIT

Page 13: Memory Organization

MAIN MEMORY

It is the central storage unit in a computer system Relatively large and fast memory used to store programs and data

during the computer operations.

Memory implementations RAM – random access memory

Static RAM Dynamic RAM

ROM – read-only memory

Page 14: Memory Organization

RANDOM ACCESS MEMORY

Static RAM (SRAM) Each cell stores bit with a six-transistor circuit. Retains value indefinitely, as long as it is kept powered. Relatively insensitive to disturbances such as electrical noise. Faster (8-16 times faster) and more expensive (8-16 times more

expensive as well) than DRAM.

Dynamic RAM (DRAM) Each cell stores bit with a capacitor and transistor. Value must be refreshed every 10-100 ms. Sensitive to disturbances. Slower and cheaper than SRAM.

Page 15: Memory Organization

READ ONLY MEMORY

ROM is a non-volatile memory, contents remain unchanged after power is turned off and on again.

Programs permanently resides in the computer.

The ROM portion of main memory is needed for storing an initial program called bootstrap loader, witch is to start the computer software operating when power is turned off

Page 16: Memory Organization

BLOCK DIAGRAM OF RAM CHIP

Page 17: Memory Organization

BLOCK DIAGRAM OF ROM CHIP

Page 18: Memory Organization

MEMORY ADDRESS MAP

• Memory Address Map is a pictorial representation of assigned address space for each chip in the system

• Assume that a computer system needs 512 bytes of RAM and 512 bytes of ROM

• The RAM have 128 byte and need seven address lines, where the ROM have 512 bytes and need 9 address lines

The memory address map for this configuration is

Page 19: Memory Organization

BLOCK DIAGRAM

Page 20: Memory Organization

CONNECTION OF MEMORY TO CPU

Page 21: Memory Organization

The hexadecimal address assigns a range of hexadecimal equivalent address for each chip

Line 8 and 9 represent four distinct binary combination to specify which RAM we chose

When line 10 is 0, CPU selects a RAM. And when it’s 1, it selects the ROM

Page 22: Memory Organization

AUXILIARY MEMORY

Devices that provide backup storage

Most commonly used auxiliary devices used in computer systems are Magnetic disks Magnetic tapes

Other components used are Magnetic drums Magnetic bubble memory Optic disks

Page 23: Memory Organization

MAGNETIC HARD DISKS

Page 24: Memory Organization

Read-write head Positioned very close to the platter surface (almost touching it) Reads or writes magnetically encoded information. Only one head reads /writes at a time.

Surface of platter divided into circular tracks Over 16,000 tracks per platter on typical hard disks

Each track is divided into sectors. A sector is the smallest unit of data that can be read or written. Sector size typically 512 bytes Typical sectors per track: 200 (on inner tracks) to 400 (on outer tracks)

To read/write a sector disk arm swings to position head on right track platter spins continually; data is read/written as sector passes under

head

Page 25: Memory Organization

Head-disk assemblies

multiple disk platters on a single spindle (typically 2 to 4)

one head per platter, mounted on a common arm.

The arm assembly is moved in or out to position a head on a desired track. Tracks under heads make a

cylinder (imaginary!).

A cylinder

It is the set of tracks at a given radius of a disk pack.

i.e. a cylinder is the set of tracks that can be accessed without moving the disk arm.

All the information on a cylinder can be accessed without moving the read/write arm.

Page 26: Memory Organization

COMPONENTS OF MAGNETIC DISK

Page 27: Memory Organization

PERFORMANCE MEASURES OF DISKs

Access time –average time required to reach a storage location in memory and obtain its contents.

Access time = seek time + transfer time

Seek time – time required to position the read –write head to a location

▪ Average seek time is 1/2 the worst case seek time.

▪ Would be 1/3 if all tracks had the same number of sectors, and we ignore the time to start and stop arm movement

▪ 4 to 10 milliseconds on typical disks

Transfer time– time required to transfer data to and from the device. 4 to 8 MB per second is typical

Rotational latency – time it takes for the sector to be accessed to appear under the head.

▪ Average latency is 1/2 of the worst case latency.

▪ 4 to 11 milliseconds on typical disks (5400 to 15000 r.p.m.)

Page 28: Memory Organization

MAGNETIC TAPE

Magnetic tape is a medium for magnetic recording generally consisting of a thin magnetically coating on a long and narrow strip of plastic. Nearly all recording tape is of this type, whether used for recording audio or video or for computer data storage.

Bits are recorded as magnetic spots on the tape along the several tracks.

Read/write heads are mounted one in each track so that data can be recorded and read as a sequence of characters.

Page 29: Memory Organization

Magnetic tape units can be stopped, started to move forward or in reverse or can be rewound.

Information is recorded in blocks referred to as records.

Gaps of unrecorded tape are inserted between records where the tape can be stopped.

The tape starts moving while in a gap and attains its constant speed by the time it reaches the next record.

Page 30: Memory Organization

ASSOCIATIVE MEMORY

Content Addressable Memory is a special kind of memory!

Read operation in traditional memory:

Input is address location of the content that we are interested in it.

Output is the content of that address.

In CAM it is the reverse: Input is associated with something

stored in the memory.

Output is location where the associated content is stored.

Page 31: Memory Organization

BLOCK DIAGRAM

Compare each word in CAM in parallel with the Content of A (Argument Register)

If CAM Word[i] = A, M(i) = 1

Read sequentially accessing CAM for CAM Word(i) for M(i) = 1

K(Key Register) provides a mask for choosing a      particular field or key in the argument in A (only those bits in the argument that have 1’s in their corresponding position of K are compared)

Argument register (A)

Key register (K)

Associative memory array

& logic M words

N bits per word

output

M

input

write

read

Page 32: Memory Organization

EXAMPLE

Suppose that the argument register A and the key register K have the bit configuration shown below. Only the three leftmost bits of A are compared with memory words because K has 1’s in these positions.

A 101 111100 K 111 000000 Word 1 100 111100 no match Word 2 101 000001 match

Page 33: Memory Organization
Page 34: Memory Organization

ASSOCIATIVE MEMORY OF m WORD AND n CELLS PER WORD

Page 35: Memory Organization

MATCH LOGIC FOR 1 WORD

Page 36: Memory Organization

Neglecting key bits, If Aj=Fij

Word i= argument in A for j=1,2,3……nThe equality of two bits can be expressed logically by the boolean function

xj=AjFij + A’jF’ij

Where xj=1 if the pair of bits in position j are equal; otherwise xj=0.

Mi=x1 x2 x3 ……..xn

If Kj=0, Aj and Fij need no comparison Kj=1, Aj and Fij need comparisonThis requirement is achieved by ORing each term with Kj’

Page 37: Memory Organization

The match logic for each word I in an associative memory can be expressed

by boolean function as.

Substitute the original definition of xj, the boolean function can be expressed as