Computer Memory

Decipher how memory actually works, layer by layer.

Retrieving Data from a Computer

Binary, Decimal, and Hexadecimal

Linear Memory Model

Memory Layout

Compiling Source Files to Executables

Memory Segments

The Code and Static Segments

The Stack Segment

The Heap Segment

Processes

Virtual and Physical Memory

Memory Pages

MMU and the OS

Page Cache

Memory Mapping

Demand Load

Page Sharing and Copy-on-Write

Libraries

Relocation

Position Independent Code

Procedure Linkage Table

Caching Overview

Details of Caching

Practical Uses of Caching

DRAM, SRAM, and CPU Caches

Computer Memory Architecture


Course description

This course was created in collaboration with Kenji Ejima and Kristian Takvam, senior members of Brilliant's software engineering team. How is the memory managed in the running program? How does the OS manage it when multiple programs are running? What are the memory related features that the CPU provides? This course will guide you through understanding memory management, layer by layer, so that you can answer the questions above and write efficient programs.


Topics covered

  • Compilation
  • Computer Memory Hierarchy
  • Copy-on-write
  • Hardware Caching
  • Least Recently Used Algorithm
  • Linking
  • Memory Mapping
  • Memory Segments
  • Position Independent Code
  • Time-aware Least Recently Used Algorithm
  • Virtual Memory

Prerequisites and next steps

You'll need an understanding of basic programming and basic data structures. This course will use C for examples


Prerequisites

  • Computer Science Fundamentals
  • Algorithms and Data Structures