Layers of Memory and Access Speed

This section describes layers of memory: CPU Register, CPU Caches, RAM and hard disk.

What Is Memory? - Memory is just a form of data storage. On a typical Ubuntu system, there are 4 layers of storage with different access speeds:

1. CPU Registers - CPU (Central Computing Unit) registers is a set of data holding places built inside the CPU. In a 64-bit CPU, each register is 64 bits in length. Access speed on CPU registers is 1 CPU cycle.

2. CPU Cache - A CPU cache is a smaller, faster storage, located next to the CPU. A computer system may have multiple CPU caches organized in a hierarchy of cache levels. Access speed on CPU caches is about 3 to 14 CPU cycles.

3. RAM - RAM (Random Access Memory) is storage located next to the CPU. RAM is used store data and machine code of running processes. Access speed on RAM is about 250 CPU cycles cycles.

4. Hard disk - A hard disk is a larger and slower storage that can store data Permanently. Access speed on disk is about 40,000,000 CPU cycles.

The diagram below shows the 4 layers of storage in 2-CPU computer systems.

Memory Layers: Registers, Caches, RAM and Disk
Memory Layers: Registers, Caches, RAM and Disk

Table of Contents

 About This Book

 Introduction to Ubuntu Systems

 GNOME - Desktop Interface and Environment

 Shell - The Command-Line Interpreter

 Process Management

Memory Management

Layers of Memory and Access Speed

 List CPU Caches and Their Sizes

 Virtual Memory vs. Physical Memory

 Buffer Memory and Cache Memory

 Verify Cache Memory with "cp" Command

 What Is Swap Space

 Virtual Memory Mapping and Page Table

 "ps -o rss,drs,trs,vsz,sz" - Process Status Options

 smem - Process Memory Usage Report

 pmap - Process Memory Map

 /proc/{id}/maps - Process Memory Map

 /proc/{id}/smaps - Process Memory Map Details

 earlyoom - A Simple OOM Killer

 Files and Directories

 APT (Advanced Package Tool)

 Network Connection on Ubuntu

 Internet Networking Tools

 SSH Protocol and ssh/scp Commands

 Administrative Tasks

 References

 Full Version in PDF/EPUB