21
WINTER Templat e HIERARCHICAL MEMORY 0 1 S Y S T E M

Hierarchical Memory System

Embed Size (px)

Citation preview

Page 1: Hierarchical Memory System

WINTERTemplate

HIERARCHICAL MEMORY

01

SYSTEM

Page 2: Hierarchical Memory System

02Register

Cache Memory

Main Memory

Disk Cache

Auxiliary Memory

Large-Capacity Memory

Memory Diagram

Page 3: Hierarchical Memory System

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.

Page 4: Hierarchical Memory System

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.

Page 5: Hierarchical Memory System

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.

Page 6: Hierarchical Memory System

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.

Page 7: Hierarchical Memory System

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)

Page 8: Hierarchical Memory System

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.

Page 9: Hierarchical Memory System

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.

Page 10: Hierarchical Memory System

02Memory Diagram

Register

Cache Memory

Main Memory

Disk Cache

Auxiliary Memory

Large-Capacity Memory

Spe

edFast

Slow

Page 11: Hierarchical Memory System

02Memory Diagram

Register

Cache Memory

Main Memory

Disk Cache

Auxiliary Memory

Large-Capacity Memory

Pric

e

Expensive

Inexpensive

Spe

edFast

Slow

Page 12: Hierarchical Memory System

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.

Page 13: Hierarchical Memory System

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.”

Page 14: Hierarchical Memory System

03Two Types of Access Locality

1. Temporal Locality2. Spatial Locality

Principle of Locality

Page 15: Hierarchical Memory System

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

Page 16: Hierarchical Memory System

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

Page 17: Hierarchical Memory System

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

Page 18: Hierarchical Memory System

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.

Page 19: Hierarchical Memory System

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).

Page 20: Hierarchical Memory System

04Program Working Set

Program Instruction Address Space Program Data Address Space

Page 21: Hierarchical Memory System

05