• No results found

CAO CH-5.pptx

N/A
N/A
Protected

Academic year: 2020

Share "CAO CH-5.pptx"

Copied!
24
0
0

Loading.... (view fulltext now)

Full text

(1)

Memory Hierarchy & I/O

Techniques

UNIT-5

(2)

Memory hierarchy

Memory Hierarchy is to obtain the highest possible access speed while minimizing the total cost of the memory system.

(3)

Memory hierarchy

Memory hierarchy goals

 

To provide CPU with necessary data (and instructions) as quickly

as possible

• To achieve this goal, a cache should keep frequently used data

• “Cache hit” when CPU finds a requested data in cache

To reduce traffic on memory bus

• Cache becomes a “filter”

• Reduces the bandwidth requirements from the main memory

L1 AND L2 CACHE

Their basic parameters are similar

• Associativity, block size, and cache size (the capacity of data array)

 

Address used to index

• L1: typically virtual address (to quickly index first)

(4)

Locality of reference principle

Locality of Reference

- The references to memory at any given time interval tend to be confined within a

localized areas

- This area contains a set of information and the membership changes gradually as

time goes by

-

Temporal Locality

The information which will be used in near future is likely to be in use

already( e.g. Reuse of information in loops)

-

Spatial Locality

(5)

CACHE

Cache

- The property of Locality of Reference makes the Cache memory

systems work

- Cache is a fast small capacity memory that should hold those

information which are most likely to be accessed

Main memory

Cache memory

(6)

CACHE

PERFORMANCE OF CACHE

All the memory accesses are directed first to Cache

If the word is in Cache; Access cache to provide it to CPU

If the word is not in Cache; Bring a block (or a line) including that word to replace a block now in Cache

Memory Access

Performance of Cache Memory System

Hit Ratio - % of memory accesses satisfied by Cache memory system Te: Effective memory access time in Cache memory system

Tc: Cache access time

Tm: Main memory access time Te = Tc + (1 - h) Tm

Example: Tc = 0.4 s, Tm = 1.2 s, h = 0.85% 

(7)

CACHE

Mapping Function

(8)

CACHE- DIRECT MAPPING

Each block of main memory maps to only one cache line — i.e. if a block is in cache, it must be in one specific place • Address is in two parts

• Least Significant w bits identify unique word • Most Significant s bits specify one memory block

(9)
(10)

CACHE- ASSOCIATIVE MAPPING

• A main memory block can load into any line of cache • Memory address is interpreted as 2 fields: tag and word • Tag uniquely identifies block of memory

• Every line’s tag is examined simultaneously for a match

(11)
(12)
(13)

MAIN memory

RAM and ROM Chips

1) Typical RAM chip

2) Typical ROM chip

Chip select Read Write 7-bit address CS RD WR AD 7 RAM

8-bit data bus

Chip select 9-bit address CS AD 9 ROM

8-bit data bus

Working memory, also called core memory electricity alters the “state” of the memory RAM.

It Refers to physical memory that is internal to the computer.

A random-access memory device allows data items to be read and written in roughly the same amount of time regardless of the order in which data items are accessed.

 

In common usage, the term RAM is synonymous with main memory, the memory available to programs.

 

In contrast, ROM (read-only memory) refers to special memory used to store programs that boot the computer and perform diagnostics.

 

(14)

RAM AND ROM

ROM is used to stockpile the code for programs that are run under the processor.  

 

RAM is used to clutch the temporary information that is produced and used by the processor. The name random access memory reflects that the user can instantaneously access any area of the memory without referring the entire memory space. The RAM memory is volatile in nature, i.e the memory stored in the RAM is temporary and it will be lost when the power gets switched off.  

(15)

SECONDARY MEMORY

Auxiliary memory

, also known as

auxiliary storage

,

secondary storage

,

secondary memory

or

external memory

, is a non-volatile memory (does not lose

stored

data when the device is powered down) that is not directly accessible by the CPU,

because it is not accessed via the input/output channels (it is an external device).

In RAM devices (as flash memory) data can be directly deleted or changed.

It is used to store a large amount of data at lesser cost per byte than

primary

memory

;

(16)

SECONDARY MEMORY

1.

off-line memory

2.

also called auxiliary or mass memory

3.

tapes, floppy's, zip drives, CDs, optical drives, etc

4.

tens to thousands of times larger than main

(17)

PERFORMANCE

Access time:

For random access memory, this is the time required to perform a read or write operation. It is the total time from the instant that an address is presented to the memory to the instant that the data has either been stored (write) or made available for use (read). For non-random access memory, this parameter represents the total time taken to position the read-write mechanism at the desired location.

Memory cycle time:

This parameter only applies to random access memory. It is the access time plus any additional time that is required before a second access to the memory can begin.

Transfer rate:

This is the rate at which data can be transferred into or out of a memory unit. For random access memory it is equal to the reciprocal of the memory cycle time, i.e., 1/(cycle-time).

where: TN = average time to read or write N bits TA = average access time

N = number of bits transferred

R = transfer rate in bits/second (bps)

(18)

MAIN MEMORY- RAM

Logical Organization

Random Access Memory

- Each word has a unique address

- Access to a word requires the same time independent of the location of the word - Organization

words

(byte, or n bytes)

2k Words

(n bits/word) n data input lines

n data output lines k address lines

Read Write

(19)

MAIN MEMORY- ROM

Characteristics

- Perform read operation only, write operation is not possible

- Information stored in a ROM is made permanent during production, and cannot be changed

- Organization

m x n ROM (m=2k)

k address input lines

(20)

TYPES OF ROM

ROM - Store information (function) during production

- Unalterable

- Low cost for large quantity production

PROM (Programmable ROM) - Store info electrically using PROM programmer at the user’s site

- Unalterable

- Higher cost than ROM

The key difference from a standard ROM is that the data is written into a ROM during manufacture, while with a PROM the data is programmed into them after manufacture.

EPROM (Erasable PROM)- Store info electrically using PROM programmer at the user’s site

- Stored info is erasable (alterable) using UV light (electrically in some devices) and rewriteable

(21)

ORGANIZATION

Basic element of semiconductor memory is the cell

they have two stable (or semi-stable) states, representing 0 or 1

they are capable of being written (at least once), to set the state

they are capable of being read to sense the state

cell has three functional units

select - selects memory cell for a read or write

control - indications operation

(22)

RAM (Random Access Memory )

Types of Main memory

DRAM

: Dynamic random-access memory

SRAM

: Static random Access Memory

(23)

The word 

static

 indicates that the memory retains its

contents as long as power is being supplied. However,

data is lost when the power gets down due to volatile

nature.

It has long life

There is no need to refresh

Faster

Used as cache memory

Large size

Expensive

High power consumption

(24)

DRAM, unlike SRAM, must be continually 

refreshed

 in order

to maintain the data. This is done by placing the memory on

a refresh circuit that rewrites the data several hundred times

per second.

It has short data lifetime

Need to be refreshed continuously

Slower as compared to SRAM

Used as RAM

Less expensive

Less power consumption

References

Related documents

Newby indicated that he had no problem with the Department’s proposed language change.. O’Malley indicated that the language reflects the Department’s policy for a number

David (1999) was amazed at the change in roles she experienced when she switched from her role as a reading specialist to that of a literacy coach. For the past 15 years, I have

As long as the table space is in backup mode Oracle will write the entire block is dumped to redo when the ALTER TABLESPACE TBSNAME BEGIN BACKUP MODE is entered but later

Request approval to 1) accept a grant award from, and enter into a grant agreement with, the American Psychological Association Board of Educational Affairs to pursue accreditation

Favor you leave and sample policy employees use their job application for absence may take family and produce emails waste company it discusses email etiquette Deviation from

Co-coordinator - First Annual Nationwide Forensic Nursing Death Investigation Course at Harris County Medical Examiner Office, Houston, TX, 2005;. Presenter – “ Conducting

If you’re a beer buff, take a guided tour at Deschutes Brewery to learn more about how the craft beer scene got its start in Central Oregon, then visit a few.. of the city’s

Combining Properties and Evidence to Support Overall Confor- mance Claims: Safety-critical system development increasingly relies on using a diverse set of verification