Memory

Overview

Memory is one of the most important parts of a computer and without it computers would be very limited.

Operating System Concepts - 8th Edition Silberschatz, Galvin, Gagne ©2009  
Some Numbers Regarding Memory
Operating System Concepts - 8th Edition Silberschatz, Galvin, Gagne ©2009  
Reading an integer from disk
Operating System Concepts - 8th Edition Silberschatz, Galvin, Gagne ©2009  

The Importance of Cache

CacheCache performance Fun with cache

Physical vs. Logical Addresses

Physical memory Logical memory Address binding

Dynamic Loading

Libraries Statically linked library Dynamically linked library (DLLDLL) and shared objectsshared objects Some details from one of the devs that created the ELF file format. The articles were written for The Linux Journal in 1995, but they're still very relevant today.

Stack and Heap

Implementing a heap using a linked list Strategies for handling memory requests FragmentationFragmentation


Paging

Page tablesPage tables Shared pages Protection Swapping

Virtual Memory

Virtual memory allows us to pretend that we have (almost) unlimited amounts of memory.

Virtual memory space

Freeing physical memory Demand paging Copy-on-write (COW)

Page replacement

Page replacement algorithmsPage replacement algorithms ThrashingThrashing Avoiding page faults Memory Cache (revisited)