Virtual Memory Flashcards

1
Q

what is virtual memory

A

provides a virtualisation of the address space

each process has a private map to translate virtual addresses into non conflicting physical addresses

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

what are the benefits of virtual memory

A

we can fill physical memory with addresses appearing where we want them.

can use physical memory sensibly without having to swap

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

what is paging or swapping

A

pages are copied onto disk to free up space.

we perform paging or swapping to bring them into main memory

this is controlled by the scheduler

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

what is the memory management unit

A

the hardware that implements memory mapping

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

a 64 bit machine can address

A

2^64 locations

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

what is a page

A

a division of a virtual memory system. the address space is divided into pages of a fixed size.

indivisible blocks assigned to processes

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

when in a page fault generated

A

when the virtual page is not resident in the MMU

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

what is the number of pages in a virtual memory system

A

address space / page size

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

what is a memory fault

A
an exception caused by:
privilege violation
page fault
time out
corrupt memory
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

what is a page state

A
each page in virtual memory will have its own state:
unallocated
allocated
clean
dirty
swapped out
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

what happens after a page fault

A

allocate a page and fetch from disk

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

what does the MMU do

A

perform memory mapping and check privilege

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

what are the inputs to the MMU

A

virtual memory address

operation

processor privilege info

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

what are the outputs of the MMU

A

success:
physical memory address
cacheability info

not success:
no physical memory
illegal operation
privilege violation

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

what is a page table

A

specifies the translation from virtual to physical page address

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

what does the MMU use to translate the address

A

translation lookaside buffer TLB

17
Q

what is TLB

A

one entry per page rather than address

speeds up memory mapping and works in parallel to L1 cache.

input - virtual address
output- physical address and permissions

18
Q

what is a dirty bit

A

indicates a modification has been made

19
Q

what is page eviction? what methods are there to choose a page to evict?

A

if the TLB is full and we get a page fault, we must choose one to evict.

random
FIFO
least recently used

20
Q

what is a pinned page. give an example

A

a pinned page is one that cannot be evicted. An example is ISRs

21
Q

what is a paging daemon

A

conducts tasks such as evicting clean pages, resorting pages and cleaning dirty pages

22
Q

what other information does the mmu store

A

memory protection permissions

23
Q

give two page permission flags

A

cacheable

write bufferable

24
Q

where are page translation tables stored

A

in privileged memory

25
Q

how do we minimise the time taken to change page tables during a context switch

A

switch the base pointer

26
Q

how does the processor find the relevant page table

A

special register which is a pointer to the base of the translation table.