Virtual Memory Flashcards

1
Q

What are the drawbacks of VM?

A

Performance Overhead. We have to go back and forth from the memory to the hard disk. It is much slower than it is to run from memory to memory.

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

What is virtual memory?

A

Virtual memory is a memory management technique used by operating systems to simulate or extend the available physical memory (RAM) by utilizing secondary storage, such as a hard drive or SSD, as an extension of RAM.

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

What is paging?

A

Paging is a memory management technique that divides physical memory into fixed-size blocks, called pages. When a process needs to access memory, the operating system translates the virtual address to a physical address by using a page table.

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

What is virtual memory paging?

A

Virtual memory paging is a memory management technique that allows a process to access more memory than is physically available. This is done by swapping pages between physical memory and a secondary storage device, such as a hard disk drive or solid-state drive.

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

What is the principle of locality and why does it happen?

A

States that computer programs tend to access the same set of memory locations repetitively over a short period of time.
This is because programs are typically structured in a way that loops over data or repeatedly calls subroutines.

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

What is Temporal locality?

A

This refers to the tendency to reuse recently accessed data or instructions.

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

What is spatial locality?

A

This refers to the tendency to access data or instructions that are located close to each other in memory.

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

How is the principle of locality used in virtual memory?

A

The principle of locality is used in virtual memory to improve performance by reducing the number of page faults.

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

Under what circumstances to page faults occur?

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

What is a page fault?

A

A page fault occurs when the processor tries to access a page of memory that is not currently in physical memory. Can occur in demand and pre paging.

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

What is demand paging?

A

A memory management technique that loads pages of memory into physical memory only when they are needed.

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

What is pre paging?

A

Loads all of the pages of a process into physical memory before the process starts executing.

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

What is Belady’s Anomaly?

A

Phenomenon in virtual memory paging systems where increasing the number of page frames can result in an increase in the number of page faults.

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