memory hierarchy + virtual memory

0.0(0)
studied byStudied by 0 people
0.0(0)
full-widthCall with Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/11

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai

No study sessions yet.

12 Terms

1
New cards

virtual memory

increases available address space by illusion of a large and private main memory

  • run programs larger than memory

  • must translate each memory reference which is slow

2
New cards

segmentation

process data is allocated to contiguous segment of memory

  • base + bound to map virtual to physical address

    • base: physical memory location of segment

    • bound: segment size

    • bound - base = size of virtual address space

3
New cards

how to translate virtual to physical address

  1. check if requested address <= bound for that process (bound register)

  2. if not, stop under bound violation

  3. else add base register value to virtual address

4
New cards

external fragmentation

small portions of memory are free but not contiguous

5
New cards

defragment

move memory around so free memory is in a contiguous block

  • computationally expensive and complex

6
New cards

paging

main and virtual memory divided into equal sized segments

  • no page shared between multiple processes

  • don’t have to be contiguous

7
New cards

how are page addresses stored

virtual page number (virtual page location of address) + offset (location of address within page)

  • only page field changes, determined by page table for each process

8
New cards

how does the page table work

uses virtual page field as index to find corresponding page field

  • also stored valid bit (0 if corresponding page in memory, 1 if not)

9
New cards

page fault

valid bit is 0 for requested process so page is fetched from disk

10
New cards

internal fragmentation

not entire allocated page is being used so memory is being wasted

11
New cards

what is a good balance between a paging and segementation system

  • divide virtual addresses into segments of variable length

  • segments and main memory are divided into fixed size pages

  • each segment has its own page table, so every process has multiple page table

12
New cards

TLB

translation look aside buffer

  • special cache to store recent page look ups

  • reduces access to main memory as to access a main memory address you need to access it twice, once for page address then for physical address