Operating systemsLesson 2 of 5 in the course Memory management

Virtual Memory: Paging, Faults, Segmentation, and Swapping

5 flashcards · 4 quiz questions · 5 match pairs · 5 fill-in sentences · English

Lesson progress
0 / 5

Your progress is kept in this browser only.Sign up to save it

Summary

Virtual memory gives programs a simple, consistent view of memory even when the computer's physical memory is limited or fragmented. This lesson introduces its purpose, the difference between virtual and physical addresses, and the benefits of keeping processes in separate address spaces.

Virtual memory is a memory-management technique that presents an idealized view of storage resources. To a running program, memory can appear as a large, contiguous address space, even though the computer's actual RAM may be smaller and divided into noncontiguous locations.

All flashcards

What is virtual memory?
A memory-management abstraction that lets programs use virtual address spaces while the system maps them to physical memory and, where appropriate, secondary storage.
What is the difference between a virtual and a physical address?
A virtual address is used by a program; a physical address identifies a location in real memory after translation.
What does the memory management unit (MMU) do?
It uses translation data to map virtual addresses to physical addresses.
What is a process's working set?
The set of pages it needs in memory to make useful progress.
What is a pinned page?
A page that cannot be moved to secondary storage while it is pinned.

Quiz questions

  1. In a demand-paged system, when does a page fault occur?Answer: When a process accesses a page that is not resident in memory.
  2. What commonly causes thrashing?Answer: Active processes collectively need more pages than physical memory can hold.
  3. Under least recently used (LRU) page replacement, which page is selected as the victim?Answer: The page that has gone the longest without being used.
  4. How does address-space swapping differ from paging?Answer: It moves the pages and segments currently resident for an entire address space.

Based on the Wikipedia article Virtual memory, licensed CC BY-SA 4.0. Adapted into a summary, flashcards and quizzes.

All Operating systems lessons