W7 - Virtual Memory (1) Flashcards

1
Q

Define virtual address space.

A

Virtual storage assigned to a process

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

Distinguish difference between real memory and virtual memory.

A

Real memory: main memory, actual RAM

Virtual memory: memory on disk, multiprogramming

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

What are the 2 characteristics fundamental to memory management?

A

1) all memory references that are logical addresses are dynamically translated into physical addresses at runtime
2) a process may be broken up into a number of pieces that don’t need to be continuously located in main memory during execution

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

True or False:

An interrupt is generated when an address is needed that is not in main memory.

A

True

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

Name some support functions required for virtual memory.

A

1) hardware must support paging and segmentation
2) operating system must include software for managing the movement of pages and/or segments between secondary memory and main memory

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

Paging

A

Each process has its own page table. Each page table entry contains the frame number of the corresponding page in main memory

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

What do the 2 extra bits need to indicate in paging?

A

1) whether the page is in main memory or not

2) whether the contents of the page has been altered since it was last loaded

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

What is an alternative to page table problem?

A

A problem is that the type of page tables, is that their size if proportional to that of the virtual address space. Our solution is inverted page table.

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

How are inverted page table efficient?

A

1) Use hashmap to map out tables
2) fixed proportion of real memory is required for the table regardless of number of processes
3) indexes page table entries by frame number than virtual page number

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

What information does an inverted page table include?

A

Page number
Process identifier
Control bits
Chain pointer

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

What is the purpose of Translation Lookaside Buffers (TLB)?

A

To overcome the problem of storing 2 physical memory accesses for page table and its data. It contains page table entries that have been most recently used

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

Briefly describe the TLB operation.

A

1) given virtual address
2) if page table entry present (TLB hit)
3) if page table entry absent (TLB miss)
4) check if page already in main memory
5) TLB updated to include new page entry

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

Describe pro and cons of different page sizes.

A

The smaller page size, the more pages required per process

Larger page tables means large portion of page tables in virtual memory

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