Lecture 4 Flashcards

1
Q

The goal of any page replacement algorithm (policy)

A

Minimize page faults

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

What are the strings of memory page references worked on by the replacement algorithm?

A

pointers (page numbers) to actual memory pages that are stored somewhere in memory

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

When does a page fault occur?

A

Given page is not loaded into physical memory and ready for immediate execution.

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

What is the ideal page to evict by the page replacement algorithm?

A

A page that is not likely to be used again in the near future.

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

Random page replacement.

A

A random frame in physical memory is selected and the page in this frame removed (evicted), and the evicted page replaced with the page next scheduled
to run on the CPU.

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

Principle of locality

A

The tendency of the CPU to

access the same set of memory locations repetitively over a short time period.

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

First In, First Out (F IF O)

A

Allows every page to spend the same amount of time in a physical memory frame.

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

The main advantage of FIFO

A

Easy to implement with just a single
pointer to the list of frames in physical memory (pointing to the page that has been
in main memory the longest)

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

Disadvantage of FIFO

A

Doesn’t necessarily keep frequently used pages in memory and replace infrequently used pages to minimize page faults.

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

What data structure does FIFO use to keep a list of pages?

A

A linked list, that maintains the order that pages entered memory so the first page in the linked list is replaced.

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

OPT (Optimal) algorithm

A

Used as a bench-mark algorithm for the design and testing of other page replacement algorithms

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

How does the optimal algorithm work?

A

Assumes that the page that will not be used for the longest period of time will be the page selected for replacement

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

An effective page replacement algorithm.

A
A page replacement algorithm that yields a
task performance (minimizing page faults) within 5% of the OP T algorithm.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

LRU (Least Recently Used) performance

A

Better task performance (lower number of page faults)

than F IF O, but a worse task performance than OP T

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

LRU (Least Recently Used)

A

Accounts for the principle of locality
That is, that the same set of pages will tend to be frequently used while the process is executing, so these pages should not be swapped out of main memory.

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

How is LRU implemented?

A

As a linked-list but, it places the new page at the head of the list and the LRU page (at
the list tail) is removed.