Lecture 17: Virtual Memory 1 Flashcards

1
Q

Assumption for Virtual Memory

A

degree of multiprogramming bounded by amount of disk space

for set of active processes: S(logical address spaces) <= size of disk

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Virtual Memory

A

Means:
1. High memory utilization, flexible memory allocation: allow allocated memory to be noncontiguous (chunked), out-of-order

  1. Swapping and virtual memory: allow some processes to have address space dynamically mapped to physical memory
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Swapping

A

Idea:

•ready or blocked processes have no physical memory allocation. Instead, address space mapped to disk

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Swapping (+,-)

A

Achieves Higher Degree of Multiprogramming Swapping • not limited by available memory, but by available disk• modify context-switch routine to add swap-out and swap-in1.

Expensive: May need a lot of disk I/O2. Time-variable: Depends on process size

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Virtual Memory

A

Ready, blocked or running process have some (but not all)of their allotment of physical memory

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Demand Paging

A

Idea:
Demand: Bring a page into memory only when it’s needed
Paging: Units of allocation are pages (fixed size)
® less I/O needed
® less memory needed
® more users allowable

Implementation:
Straightforward extension of paging

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Page Replacement:

A

• find some page in memory but not really in use, and swap it out

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Page Fault Rate:

A
  • p = 0 → no page faults

* p = 1 → every reference is a fault

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Effective Access Time

A
EAT = (1 - p) ´ memory access time
p x ( page fault overhead
\+ [swap page out]
\+ swap page in
\+ restart overhead )
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Some Typical Numbers

A

Memory Access Time: 1 microsecond
• swap page in time = swap page out time = 10,000 microseconds
• 50% of time, page being replaced has been modified (dirty) and needs to
be swapped out

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

When is a page needed?

A

when it is referenced (read or written).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly