Modern Operating Systems - Memory Management

0.0(0)
Studied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/37

flashcard set

Earn XP

Description and Tags

Comprehensive vocabulary flashcards covering fundamental memory management concepts, dynamic relocation, paging mechanisms, page replacement algorithms, working set theory, and segmentation from Chapter 3 of Tanenbaum's Modern Operating Systems.

38 Terms

1
New cards

Memory Hierarchy

The structural layering of computer storage technologies to balance access speed, cost, and capacity, typically arranged as registers, cache, memory (RAM), disk, and magnetic tape.

2
New cards

Static Relocation

A technique (employed on machines like the IBM 360) where a constant base offset is physically added to every memory address within a program by the loader as it is loaded into memory.

3
New cards

Address Space

An abstract set of memory addresses that a process can use to address memory, created so that each process has its own private space independent of all other processes.

4
New cards

Dynamic Relocation

A hardware-assisted relocation mechanism where the CPU automatically adds the contents of a base register to every referenced address and verifies that the address does not exceed the limit register.

<p>A hardware-assisted relocation mechanism where the CPU automatically adds the contents of a base register to every referenced address and verifies that the address does not exceed the limit register.</p>
5
New cards

Base Register

A special CPU register containing the starting physical address where a program is loaded in contiguous memory.

6
New cards

Limit Register

A special CPU register specifying the length or upper boundary of a program's allocated partition to prevent accesses outside its designated address space.

7
New cards

Swapping

A memory management strategy in which entire processes are brought into physical memory to run and swapped out to secondary storage (disk) when memory is oversubscribed.

8
New cards

Memory Compaction

The technique of shifting all active processes toward one end of memory to consolidate all separate unused holes into a single large free block, which consumes significant CPU time.

9
New cards

Bitmap (Memory Management)

A representation of memory allocation where memory is partitioned into allocation units, and each unit is tracked by a single bit (e.g., 00 for free, 11 for allocated).

<p>A representation of memory allocation where memory is partitioned into allocation units, and each unit is tracked by a single bit (e.g., $$0$$ for free, $$1$$ for allocated).</p>
10
New cards

First Fit

A memory allocation algorithm that scans the list of holes from the beginning and allocates the first hole encountered that is large enough to satisfy the request.

11
New cards

Next Fit

A memory allocation algorithm that behaves like first fit, but begins searching the hole list from the location where the last allocation occurred rather than starting from the beginning.

12
New cards

Best Fit

A memory allocation algorithm that searches the entire list of free holes to find and allocate the smallest hole that is large enough to satisfy the request.

13
New cards

Worst Fit

A memory allocation algorithm that searches memory to find and allocate from the largest available hole, leaving a remaining hole large enough to remain useful.

14
New cards

Quick Fit

A memory allocation algorithm that maintains separate lists or queues of free holes sorted by commonly requested process sizes to speed up allocation.

15
New cards

Virtual Memory

A memory architecture that divides a program's address space into chunks called pages, allowing programs to execute even when only part of their address space is present in physical memory.

16
New cards

Memory Management Unit (MMU)

A hardware device, commonly integrated directly onto the CPU chip, responsible for mapping and translating incoming virtual addresses into physical memory addresses.

<p>A hardware device, commonly integrated directly onto the CPU chip, responsible for mapping and translating incoming virtual addresses into physical memory addresses.</p>
17
New cards

Page

A contiguous, fixed-size unit of virtual address space (such as 4 KB4\,\text{KB}) that is mapped into a physical page frame.

18
New cards

Page Frame

A fixed-size contiguous block of physical RAM into which a virtual page is placed.

19
New cards

Page Table

An operating system data structure indexed by virtual page numbers whose entries provide the mapping from virtual pages to physical page frames.

20
New cards

Page Table Entry (PTE)

A record inside a page table containing the physical page frame number, along with attribute bits: Present/absent, Protection, Modified (dirty), Referenced, and Caching disabled.

<p>A record inside a page table containing the physical page frame number, along with attribute bits: Present/absent, Protection, Modified (dirty), Referenced, and Caching disabled.</p>
21
New cards

Translation Lookaside Buffer (TLB)

A special, high-speed associative hardware cache located inside the MMU that stores recent virtual-to-physical address mappings to avoid accessing the page table in memory on every reference.

<p>A special, high-speed associative hardware cache located inside the MMU that stores recent virtual-to-physical address mappings to avoid accessing the page table in memory on every reference.</p>
22
New cards

Multilevel Page Table

A hierarchical paging structure (e.g., using a top-level page table and second-level page tables) designed to avoid keeping all page tables for a large address space in physical memory simultaneously.

<p>A hierarchical paging structure (e.g., using a top-level page table and second-level page tables) designed to avoid keeping all page tables for a large address space in physical memory simultaneously.</p>
23
New cards

Page Fault

A hardware trap triggered when a CPU accesses a virtual address whose corresponding page table entry has a Present/absent bit of 00, requiring the OS to retrieve the page from disk.

24
New cards

Optimal Page Replacement Algorithm

An ideal, unimplementable benchmark algorithm that evicts the page that will not be referenced for the longest interval in the future.

25
New cards

First-In, First-Out (FIFO) Page Replacement

A simple page replacement algorithm that maintains a queue of all pages in memory and evicts the oldest page (the one loaded earliest).

26
New cards

Bélády's Anomaly

The counterintuitive phenomenon where increasing the number of page frames assigned to a process actually increases the number of page faults under certain algorithms, such as FIFO.

27
New cards

Second Chance Page Replacement Algorithm

An enhancement to FIFO where the oldest page's Referenced (RR) bit is inspected: if R=0R = 0, the page is evicted; if R=1R = 1, RR is cleared, the load time is updated to current time, and it is given a second chance.

<p>An enhancement to FIFO where the oldest page's Referenced ($$R$$) bit is inspected: if $$R = 0$$, the page is evicted; if $$R = 1$$, $$R$$ is cleared, the load time is updated to current time, and it is given a second chance.</p>
28
New cards

Clock Page Replacement Algorithm

A realistic, circular-list implementation of second chance replacement where a hand points to candidate page frames; if R=0R = 0, the page is evicted, and if R=1R = 1, the bit is cleared and the hand advances.

<p>A realistic, circular-list implementation of second chance replacement where a hand points to candidate page frames; if $$R = 0$$, the page is evicted, and if $$R = 1$$, the bit is cleared and the hand advances.</p>
29
New cards

Least Recently Used (LRU) Algorithm

A page replacement algorithm that evicts the page that has not been referenced for the longest period of time, relying on the principle of locality.

30
New cards

Not Recently Used (NRU) Algorithm

A page replacement algorithm that classifies pages into four categories based on their Referenced (RR) and Modified (MM) bits (Class 0: 00, Class 1: 01, Class 2: 10, Class 3: 11) and evicts a random page from the lowest non-empty class.

31
New cards

Not Frequently Used (NFU) Algorithm

A crude software approximation of LRU where each page has a counter incremented on clock ticks if its RR bit is set; the lowest-counter page is evicted on a page fault, but old access history is never forgotten.

32
New cards

Aging Algorithm

An efficient software simulation of LRU that shifts page counters right by 11 bit at each clock tick and inserts the page's current RR bit as the most significant bit, gradually discounting older references.

<p>An efficient software simulation of LRU that shifts page counters right by $$1$$ bit at each clock tick and inserts the page's current $$R$$ bit as the most significant bit, gradually discounting older references.</p>
33
New cards

Working Set

The set of virtual pages referenced by a process during a sliding window of execution time or within the kk most recent memory references.

<p>The set of virtual pages referenced by a process during a sliding window of execution time or within the $$k$$ most recent memory references.</p>
34
New cards

Prepaging

The memory management strategy of preloading a process's working set of pages into physical memory before resuming execution to prevent an immediate burst of page faults.

35
New cards

WSClock Page Replacement Algorithm

An efficient working set replacement algorithm based on a circular list of frames (a clock) that checks the RR bit, age relative to threshold τ\tau, and dirty status to select clean pages outside the working set for eviction.

<p>An efficient working set replacement algorithm based on a circular list of frames (a clock) that checks the $$R$$ bit, age relative to threshold $$\tau$$, and dirty status to select clean pages outside the working set for eviction.</p>
36
New cards

Local Page Replacement

An allocation policy that resolves a page fault by selecting an eviction candidate strictly from the set of page frames already assigned to the faulting process.

37
New cards

Global Page Replacement

An allocation policy that dynamically selects an eviction candidate from any page frame in physical memory, regardless of which process owns it.

38
New cards

Segmentation

A memory management scheme providing multiple independent, variable-length, one-dimensional address spaces (segments) allowing tables, stacks, and code to grow and shrink without bumping into one another.

<p>A memory management scheme providing multiple independent, variable-length, one-dimensional address spaces (segments) allowing tables, stacks, and code to grow and shrink without bumping into one another.</p>