wisconsin
Chapter 9: Virtual Memory

Chapter 9: Virtual Memory

Content locked

The catalog is public. Reading this content requires approved access.

Sign in to read
Chapter 9: Virtual Memory
Virtual Memory
9.1 Physical and Virtual Addressing
9.2 Address Spaces
Practice Problem 9.1 (solution page 916)
9.3 VM as a Tool for Caching
9.3.1 DRAM Cache Organization
9.3.2 Page Tables
Practice Problem 9.2 (solution page 917)
9.3.3 Page Hits
9.3.4 Page Faults
9.3.5 Allocating Pages
9.3.6 Locality to the Rescue Again
Aside Counting page faults
9.4 VM as a Tool for Memory Management
9.5 VM as a Tool for Memory Protection
9.6 Address Translation
Practice Problem 9.3 (solution page 917)
9.6.1 Integrating Caches and VM
9.6.2 Speeding Up Address Translation with a TLB
9.6.3 Multi-Level Page Tables
9.6.4 Putting It Together: End-to-End Address Translation
Practice Problem 9.4 (solution page 917)
D. Physical memory reference
9.7 Case Study: The Intel Core i7/Linux Memory System
9.7.1 Core i7 Address Translation
9.7.2 Linux Virtual Memory System
Aside Optimizing address translation
Linux Virtual Memory Areas
Linux Page Fault Exception Handling
9.8 Memory Mapping
9.8.1 Shared Objects Revisited
9.8.2 The fork Function Revisited
9.8.3 The execve Function Revisited
9.8.4 User-Level Memory Mapping with the mmap Function
Practice Problem 9.5 (solution page 918)
9.9 Dynamic Memory Allocation
9.9.1 The malloc and free Functions
Aside How big is a word?
9.9.2 Why Dynamic Memory Allocation?
9.9.3 Allocator Requirements and Goals
Aside Relaxing the monotonicity assumption
9.9.4 Fragmentation
9.9.5 Implementation Issues
9.9.6 Implicit Free Lists
Practice Problem 9.6 (solution page 919)
9.9.7 Placing Allocated Blocks
9.9.8 Splitting Free Blocks
9.9.9 Getting Additional Heap Memory
9.9.10 Coalescing Free Blocks
9.9.11 Coalescing with Boundary Tags
Practice Problem 9.7 (solution page 919)
9.9.12 Putting It Together: Implementing a Simple Allocator
General Allocator Design
Basic Constants and Macros for Manipulating the Free List
Creating the Initial Free List
Freeing and Coalescing Blocks
Allocating Blocks
Practice Problem 9.8 (solution page 920)
Practice Problem 9.9 (solution page 920)
9.9.13 Explicit Free Lists
9.9.14 Segregated Free Lists
Simple Segregated Storage
Practice Problem 9.10 (solution page 921)
Segregated Fits
Buddy Systems
9.10 Garbage Collection
9.10.1 Garbage Collector Basics
9.10.2 Mark&Sweep Garbage Collectors
9.10.3 Conservative Mark&Sweep for C Programs
9.11.1 Dereferencing Bad Pointers
9.11.2 Reading Uninitialized Memory
9.11.3 Allowing Stack Buffer Overflows
9.11.4 Assuming That Pointers and the Objects They Point to Are the Same Size
9.11.5 Making Off-by-One Errors
9.11.6 Referencing a Pointer Instead of the Object It Points To
9.11.7 Misunderstanding Pointer Arithmetic
9.11.8 Referencing Nonexistent Variables
9.11.9 Referencing Data in Free Heap Blocks
9.11.10 Introducing Memory Leaks
9.12 Summary
Bibliographic Notes
Homework Problems
9.11 ◆
9.12 ◆
9.13 ◆
C. Physical memory reference
9.14 ◆◆
9.15 ◆
9.16 ◆
9.17 ◆◆◆
9.18 ◆◆◆
9.19 ◆
9.20 ◆◆◆◆
Solutions to Practice Problems
Solution to Problem 9.1 (page 841)
Solution to Problem 9.2 (page 843)
Solution to Problem 9.3 (page 852)
Solution to Problem 9.4 (page 860)
Solution to Problem 9.5 (page 875)
Solution to Problem 9.6 (page 885)
Solution to Problem 9.7 (page 888)
Solution to Problem 9.8 (page 897)
Solution to Problem 9.9 (page 897)
Solution to Problem 9.10 (page 900)
Part III
Interaction and Communication between Programs
Source footnotes