0
0
Operating Systemsknowledge~10 mins

Page replacement algorithms (FIFO, LRU, Optimal) in Operating Systems - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to identify the page replacement algorithm that removes the oldest page first.

Operating Systems
algorithm = "[1]"  # This algorithm replaces the oldest page in memory first.
Drag options to blanks, or click blank then click option'
ARandom
BLRU
CFIFO
DOptimal
Attempts:
3 left
💡 Hint
Common Mistakes
Confusing FIFO with LRU which removes least recently used pages.
Choosing Optimal which requires future knowledge.
2fill in blank
medium

Complete the code to identify the algorithm that replaces the page which will not be used for the longest time in the future.

Operating Systems
algorithm = "[1]"  # This algorithm requires future knowledge of page references.
Drag options to blanks, or click blank then click option'
AOptimal
BFIFO
CLRU
DClock
Attempts:
3 left
💡 Hint
Common Mistakes
Choosing LRU which uses past usage, not future.
Confusing with FIFO which uses arrival order.
3fill in blank
hard

Fix the error in the description of the algorithm that replaces the least recently used page.

Operating Systems
algorithm = "[1]"  # This algorithm replaces the page that was used the longest time ago.
Drag options to blanks, or click blank then click option'
AFIFO
BLRU
COptimal
DRandom
Attempts:
3 left
💡 Hint
Common Mistakes
Confusing LRU with FIFO which removes oldest loaded page.
Choosing Optimal which requires future knowledge.
4fill in blank
hard

Fill both blanks to complete the sentence describing FIFO and LRU algorithms.

Operating Systems
The [1] algorithm replaces pages in the order they were loaded, while the [2] algorithm replaces pages based on least recent usage.
Drag options to blanks, or click blank then click option'
AFIFO
BOptimal
CLRU
DClock
Attempts:
3 left
💡 Hint
Common Mistakes
Mixing up FIFO and LRU in the sentence.
Choosing Optimal which is not described here.
5fill in blank
hard

Fill all three blanks to complete the dictionary that maps algorithm names to their key characteristics.

Operating Systems
algorithms = {"FIFO": "[1]", "LRU": "[2]", "Optimal": "[3]"}
Drag options to blanks, or click blank then click option'
Aremoves oldest page
Bremoves least recently used page
Cremoves page not used for longest future time
Dremoves random page
Attempts:
3 left
💡 Hint
Common Mistakes
Mixing up the descriptions of LRU and Optimal.
Choosing random page removal which is not part of these algorithms.