Lecture 5 Flashcards

1
Q

What is virtual memory and its purpose?

A

Virtual memory extends the apparent size of physical memory using secondary storage, optimizing the use of main memory and hard disk.

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

What are the main components involved in virtual memory?

A

Cache memory, virtual memory, and the Translation Lookaside Buffer (TLB).

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

Describe the address translation process in virtual memory.

A

Virtual address received.
Check TLB for a match.
If TLB hit, obtain physical address and access cache.
If cache miss, fetch data from main memory to cache.
If TLB miss, check PT.
If PT hit, update TLB and fetch data.
If PT miss, load page from disk, update PT, TLB, main memory, and cache.

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

What is a page fault and how is it handled?

A

A page fault occurs when a memory page is not mapped to physical memory. It requires mapping the page into the virtual address space and possibly loading it from disk.

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

What is a page in virtual memory and its typical size?

A

A page is a collection of memory words moved between disk and main memory, typically ranging from 2K to 16K bytes.

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

What is the function and structure of a Page Table (PT)?

A

The PT maintains mappings of virtual pages to physical pages. It includes fields for the virtual page number, physical page number, valid bit, dirty bit, and access permissions.

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

What do the valid and dirty bits in a Page Table indicate?

A

The valid bit indicates if the page is in main memory. The dirty bit indicates if the page has been modified while in main memory.

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

What are the address fields in a virtual memory address?

A

Virtual Page Number and Offset.

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

What are the main page replacement policies?

A

Random Replacement
FIFO (First In, First Out)
Clock Replacement
OPT (Optimal Page Replacement)
LRU (Least Recently Used)

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

What is segmentation in memory design?

A

Segmentation divides memory into blocks of varying size, used for relocating programs and providing protection.

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