Modul 7- Swapping Flashcards

1
Q

Virtual memory goals?

A

1: Allowing two or more processes to use main memory, given them an illusion of private memory.
2: Provide the illusion of a much larger address space than provided by the main memory.

Pages can be temporarily stored in secondary memory i.e. on disk.

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

What does swapping help us with?

A

Swapping let’s us have some pages of processes virtual memory on a disk (hard-drive).

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

Problems with swapping?

A
  • Memory management must detect that a page is currently not in memory.
  • If it is not in memory, how do we find it?
  • If the memory is full, which page do we throw out?
  • When we throw out a page, do we have to copy it to disk?
  • Who should do all this, hardware or operating system?
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

When a page is asked for what happens?

A
  1. Check if page is present in memory. (TLB)
    1. 1 If present check if the access is allowed (Hit)
    2. 1 If it is allowed translate address, else segmentation fault
    3. 2 If page isn’t present, check if page is allocated on disk (Miss)
  2. 2 If it’s on the disk, swap in page, else check is segment is allowed.
  3. If the segment is allowed, allocate page else segmentation fault.

(Check slide lecture about swapping page 8).

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

What is the swap space?

A
  • Reserved space in the disk for moving pages back and forth.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What does present bits in a page table entry tell us?

A
  • It tells us whether a page is present in physical memory (present bit = 1) or if it’s on the disk (present bit = 0)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is a page fault?

A
  • The act of accessing a page that is not in physical memory.
  • Upon page fault the OS is invoked to service the page fault, known as page-fault handler. Thus arranges for the transfer of the desired page from disk to memory.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly