Lecture 1 Flashcards

1
Q

When running the FIFO algorithm will increasing the number of frames decrease the page faults?

A

No, this is Belady’s Anomaly.

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

Belady’s Anomaly.

A

Increasing the number of page frames results in an increase in the number of page faults for a given memory access pattern.

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

In which algorithms is Beladys Anomaly seen in and which ones is it not.

A

Experienced in the F IF O,second chance, and random page replacement algorithms, but not in the optimal(OP T) and LRU page replacement algorithms.

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

Stack based page replacement algorithms.

A

A stack based algorithm is one for which it can be shown that the set of pages in memory for N frames is always a subset of the set of pages that would be in memory with N+ 1 frames. So if the number of frames increases then these N pages will still be the most recently referenced and so will still be in memory.

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

Which two algorithms studied fall into stack based page replacement algorithms?

A

LRU and OPT (Optimal).

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

Why does LRU and OPT(optimal) algorithms not suffer from Beladys Anomaly?

A

They are stack based page replacement algorithms.

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

Most Frequently Used (MFU) algorithm.

A

Replaces the most frequently used page.

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

How does MFU and LRU keep track of the number of references made to each page?

A

Keep a counter of the number of references that have been made to each page.

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

What is the rationale behind the MFU algorithm?

A

The page with the largest count has been used enough and that pages with smaller counts were probably just brought into main memory and have yet to be used.

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

Explain the hardware assistance needed for the LRU algorithm.

A

OS keeps a time stamp for each page with the time of the last access in order to swap-out the least recently used page.
OS keeps a doubly linked-list of pages, where the front of the list is the most recently used page, and the end is the least recently used page.

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

Why isnt implementing a perfect LRU feasible?

A

To computationally expensive.

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

Explain how a perfect LRU is computationally expensive.

A

Counter with each page reference must be updated and stored in cache memory.
Linked list must be maintained in cache memory and the pointers to a link list must be modified.

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