Memory hierarchy

Hierarchymemory hierarchiesstorage hierarchymemorymemory subsystemmemory systemmodels of memory
In computer architecture, the memory hierarchy separates computer storage into a hierarchy based on response time.wikipedia
85 Related Articles

Processor register

registersregistergeneral purpose register
1) Internal – Processor registers and cache.
Processor registers are normally at the top of the memory hierarchy, and provide the fastest way to access data.

Computer data storage

main memorystoragememory
In computer architecture, the memory hierarchy separates computer storage into a hierarchy based on response time. Main memory (Primary storage) – Gigabytes in size. Best access speed is around 10 GB/second. In the case of a NUMA machine, access times may not be uniform
In practice, almost all computers use a storage hierarchy, which puts fast but expensive and small storage options close to the CPU and slower but larger and cheaper options farther away.

Central processing unit

CPUprocessorprocessors
Most modern CPUs are so fast that for most program workloads, the bottleneck is the locality of reference of memory accesses and the efficiency of the caching and memory transfer between different levels of the hierarchy.
The performance of the memory hierarchy also greatly affects processor performance, an issue barely considered in MIPS calculations.

Cache hierarchy

cachehierarchyMemory caches are multi-leveled
Cache Hierarchy
Cache hierarchy is a form and part of memory hierarchy, and can be considered a form of tiered storage.

CPU cache

cachecache memorycaches
1) Internal – Processor registers and cache. Most modern CPUs are so fast that for most program workloads, the bottleneck is the locality of reference of memory accesses and the efficiency of the caching and memory transfer between different levels of the hierarchy. The resulting load on memory use is known as pressure (respectively register pressure, cache pressure, and (main) memory pressure). Terms for data being missing from a higher level and needing to be fetched from a lower level are, respectively: register spilling (due to register pressure: register to cache), cache miss (cache to main memory), and (hard) page fault (main memory to disk).
Memory hierarchy

Optimizing compiler

compiler optimizationoptimizationoptimizations
Optimizing compilers are responsible for generating code that, when executed, will cause the hardware to use caches and registers efficiently.
;Exploit the memory hierarchy: Accesses to memory are increasingly more expensive for each level of the memory hierarchy, so place the most commonly used items in registers first, then caches, then main memory, before going to disk.

Computer memory

memorymemoriesmain memory
Main memory (Primary storage) – Gigabytes in size. Best access speed is around 10 GB/second. In the case of a NUMA machine, access times may not be uniform
Memory hierarchy

Hierarchical storage management

HSMautomated storage tieringhierarchical storage manager
Hierarchical storage management
Memory hierarchy

Computer architecture

architecturearchitecturescomputer design
In computer architecture, the memory hierarchy separates computer storage into a hierarchy based on response time. For example, a paging algorithm may be considered as a level for virtual memory when designing a computer architecture, and one can include a level of nearline storage between online and offline storage.

Computer programming

programmingcodingcomputer programmer
Memory hierarchy affects performance in computer architectural design, algorithm predictions, and lower level programming constructs involving locality of reference.

Locality of reference

localitydata localitycache locality
Most modern CPUs are so fast that for most program workloads, the bottleneck is the locality of reference of memory accesses and the efficiency of the caching and memory transfer between different levels of the hierarchy. Memory hierarchy affects performance in computer architectural design, algorithm predictions, and lower level programming constructs involving locality of reference.

Virtual memory

virtual storagememoryswap
For example, a paging algorithm may be considered as a level for virtual memory when designing a computer architecture, and one can include a level of nearline storage between online and offline storage.

Nearline storage

nearlineNear-linenearline archive
For example, a paging algorithm may be considered as a level for virtual memory when designing a computer architecture, and one can include a level of nearline storage between online and offline storage.

Non-RAID drive architectures

JBODspanned volumearray of bare discs
For example, always-on spinning disks are online, while spinning disks that spin-down, such as massive array of idle disk (MAID), are nearline.

Tape library

tape librariesautoloaderautoloaders
Removable media such as tape cartridges that can be automatically loaded, as in a tape library, are nearline, while cartridges that must be manually loaded are offline.

Bottleneck

bottlenecks
Most modern CPUs are so fast that for most program workloads, the bottleneck is the locality of reference of memory accesses and the efficiency of the caching and memory transfer between different levels of the hierarchy.

Register allocation

register spillingspilledallocation
The resulting load on memory use is known as pressure (respectively register pressure, cache pressure, and (main) memory pressure). Terms for data being missing from a higher level and needing to be fetched from a lower level are, respectively: register spilling (due to register pressure: register to cache), cache miss (cache to main memory), and (hard) page fault (main memory to disk).

Instruction set architecture

instruction setinstructionsinstruction
The resulting load on memory use is known as pressure (respectively register pressure, cache pressure, and (main) memory pressure). Terms for data being missing from a higher level and needing to be fetched from a lower level are, respectively: register spilling (due to register pressure: register to cache), cache miss (cache to main memory), and (hard) page fault (main memory to disk).

Page fault

invalid page faultmemory exceptionminor page fault
The resulting load on memory use is known as pressure (respectively register pressure, cache pressure, and (main) memory pressure). Terms for data being missing from a higher level and needing to be fetched from a lower level are, respectively: register spilling (due to register pressure: register to cache), cache miss (cache to main memory), and (hard) page fault (main memory to disk).

Programming language

programming languageslanguagedialect
Modern programming languages mainly assume two levels of memory, main memory and disk storage, though in assembly language and inline assemblers in languages such as C, registers can be directly accessed.

Assembly language

assemblerassemblyassembly code
Modern programming languages mainly assume two levels of memory, main memory and disk storage, though in assembly language and inline assemblers in languages such as C, registers can be directly accessed.

Inline assembler

inline assemblyinline assembly languageinline
Modern programming languages mainly assume two levels of memory, main memory and disk storage, though in assembly language and inline assemblers in languages such as C, registers can be directly accessed.

C (programming language)

CC programming languageC language
Modern programming languages mainly assume two levels of memory, main memory and disk storage, though in assembly language and inline assemblers in languages such as C, registers can be directly accessed.

Code refactoring

refactoringrefactoredrefactor
Then the memory hierarchy will be assessed during code refactoring.

Micro-operation

micro-operationsmicro-opmacro-op fusion
Level 0 (L0) Micro operations cache – 6 KiB in size