Hierarchical Memory System

Preview:

Citation preview

WINTERTemplate

HIERARCHICAL MEMORY

01

SYSTEM

02Register

Cache Memory

Main Memory

Disk Cache

Auxiliary Memory

Large-Capacity Memory

Memory Diagram

02Register

Cache Memory

Main Memory

Disk Cache

Auxiliary Memory

Large-Capacity Memory

Memory Diagram

It is a low-capacity, high-speed memory where data is temporarily stored. It is located in the CPU.

02Register

Cache Memory

Main Memory

Disk Cache

Auxiliary Memory

Large-Capacity Memory

Memory Diagram

It is a high-speed, small-capacity memory that is placed between the CPU or registers and the main memory.

02Register

Cache Memory

Main Memory

Disk Cache

Auxiliary Memory

Large-Capacity Memory

Memory Diagram

Referred as the ‘real memory’. DRAM is the predominant choice for implement computer main memory.

02Register

Cache Memory

Main Memory

Disk Cache

Auxiliary Memory

Large-Capacity Memory

Memory Diagram

The cache memory placed between a hard disk and the main memory.

02Register

Cache Memory

Main Memory

Disk Cache

Auxiliary Memory

Large-Capacity Memory

Memory Diagram

Devices that provide backup storage. The most common auxiliary memory devices used in computer systems are magnetic tapes and magnetic disks (hard disks)

02Register

Cache Memory

Main Memory

Disk Cache

Auxiliary Memory

Large-Capacity Memory

Memory Diagram

It is like a ‘second’ auxiliary memory. An example of a large-capacity memory is an optical disk.

02Register

Cache Memory

Main Memory

Disk Cache

Auxiliary Memory

Large-Capacity Memory

Memory Diagram

Additional: Remote memory – practically unlimited with varying speed. Examples are other computers and

internet (cloud)

Each level of the hierarchy is usually a

subset of the level below.

The memory hierarchy is organized into several levels of memory with the smaller, faster

memory levels closer to the CPU.

Data found in a level is also found in the level

below but at longer access time.

02Memory Diagram

Register

Cache Memory

Main Memory

Disk Cache

Auxiliary Memory

Large-Capacity Memory

Spe

edFast

Slow

02Memory Diagram

Register

Cache Memory

Main Memory

Disk Cache

Auxiliary Memory

Large-Capacity Memory

Pric

e

Expensive

Inexpensive

Spe

edFast

Slow

02Register

Cache Memory

Main Memory

Disk Cache

Auxiliary Memory

Large-Capacity Memory

Memory Diagram

The overall goal of memory hierarchy is to obtain the highest

possible average access speed while minimizing the total

cost of the entire memory system.

The concept is greatly aided by the principal of locality leading to

working set of a program.

03Principle of Locality

Also known as Locality of ReferenceThe phenomenon of the same value or related storage locations being frequently accessed.

90/10 Rule comes from the empirical

observation:“A program spends 90% of its time in 10% of its code.”

03Two Types of Access Locality

1. Temporal Locality2. Spatial Locality

Principle of Locality

031. Temporal Locality

Refers to the reuse of specific data and/or resources within relatively small time durations

Principle of Locality

Example: Instruction in the body of inner loops

032. Spatial Locality

Refers to the use of data elements within relatively close storage locations.

Principle of Locality

Example: Sequential instruction executions, sequential access

to elements of an arrays

032. Spatial Locality

Principle of Locality

Sequential locality, a special case of spatial locality, occurs when data elements are arranged and access linearly

Example: Traversing the elements in a one-dimentional

array

03Principle of Locality

System which exhibit strong locality of reference are good candidates for performance optimization through the use of techniques like the cache and instruction prefetch technology for memory or the advanced branch predictor at the pipelining of processors.

04Program Working Set

The “working set” is short hand for “parts of memory that the current algorithm is using”Any instant of time where programs usually access a relatively small portion of their address space (instruction/data).

04Program Working Set

Program Instruction Address Space Program Data Address Space

05

Recommended