Review:
Nru (not Recently Used) Algorithm
overall review score: 4
⭐⭐⭐⭐
score is between 0 and 5
The NRU (Not-Recently-Used) algorithm is a page replacement technique used in operating systems to manage memory by selecting pages for removal based on their recent usage patterns. Unlike simpler strategies such as FIFO, NRU categorizes pages into classes based on whether they have been referenced or modified recently, aiming to optimize the balance between keeping frequently accessed pages in memory and freeing space effectively.
Key Features
- Classifies pages into categories based on reference and modification bits
- Uses periodic resets of reference bits to identify recent vs. not recent activity
- Provides a more dynamic approach compared to FIFO or pure LRU algorithms
- Typically implemented with hardware support for efficiency
- Aims to approximate Least Recently Used (LRU) behavior with lower overhead
Pros
- More efficient than simple FIFO in managing page replacements
- Capable of better performance in systems with predictable access patterns
- Less overhead than maintaining an exact LRU list
- Balances recency and frequency considerations effectively
Cons
- Requires hardware support or additional bits per page (reference/modify bits)
- Can be less accurate than true LRU algorithms, leading to suboptimal replacements
- Periodic reset of reference bits can sometimes misclassify pages, affecting performance
- Implementation complexity is higher compared to naive algorithms