Virtual Memory

22 flashcardsby —Griffith—
Study these flashcardsFree · spaced repetition · iPhone, Android, Mac & web

All cards

1
What is virtual memory?
Virtual memory is the separation of user logical memory from physical memory.
2
What is the benefit of virtual memory for processes?
It allows a large virtual memory to be provided to processes even if the physical memory is small.
3
How does virtual memory help programmers?
It offloads programmers from having to worry about writing overlay codes.
4
How is virtual memory implemented?
Virtual memory is implemented using demand paging or demand segmentation.
5
What responsibility do demand paging and demand segmentation take off the programmer?
They take the responsibility off the programmer for coding overlays, fixed, or variable partitions.
6
Where does a process reside before execution in demand paging?
A process resides in secondary storage (usually a disk).
7
How are processes brought into memory in demand paging?
When a process needs to be executed, it is paged into memory.
8
Are entire processes loaded into memory in demand paging?
No, only the pages that are needed are brought in by a lazy swapper.
9
What hardware support is needed for demand paging?
Hardware support is needed to distinguish between pages that are in memory and those on disk.
10
What is the valid-invalid scheme in demand paging?
Valid means the page is in memory and legal; invalid means the page is either not in the logical address space or is on the disk.
11
What are the advantages of demand paging?
Avoids reading pages that will not be used, decreases paging time, and decreases the need for physical memory.
12
What is the role of a pager?
A pager decides which pages to bring into memory.
13
How does a pager differ from a swapper?
A pager is concerned with individual pages of a process, while a swapper manipulates the entire process.
14
How does a pager predict which pages to bring in?
The pager guesses which page will be used before the process is swapped out again.
15
How is memory divided in demand segmentation?
Address spaces are divided into segments.
16
What is a segment in demand segmentation?
Each segment has a linear sequence of addresses from 0 to a maximum value.
17
Can segment lengths change during execution?
Yes, segment lengths may change during execution.
18
How does demand segmentation support flexible memory use?
Each segment has different addresses and can shrink and grow without affecting other segments.
19
How are segments tracked in demand segmentation?
Segment tables are used to keep track of segments.
20
What does demand segmentation allocate memory into?
Demand segmentation allocates memory into segments.
21
What is the difference between demand paging and demand segmentation?
Demand paging focuses on fixed-size blocks (pages), while demand segmentation uses variable-sized logical units (segments).
22
What do both demand paging and demand segmentation implement?
Both are techniques for implementing virtual memory.
Study all 22 cards for free