Memory Management

This chapter provides introductions and tutorial notes on memory management. Topics include memory layers and access speed; cache memory levels; virtual memory and physical memory mapping; page table; buffers, caches and swap spaces; memory usage reporting tools: free, ps, smem, pmap, /proc/meminfo, /proc/{id}/maps, and /proc/{id}/smaps.

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

Takeaways:

Table of Contents

 About This Book

 Introduction to Ubuntu Systems

 GNOME - Desktop Interface and Environment

 Shell - The Command-Line Interpreter

 Process Management

Memory Management

 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