Micro OSY
Micro OSY
PROJECT REPORT
ON
“Page replacement algorithm”
OF DIPLOMA IN COMPUTER ENGINEERING
SUBMITTED BY
Prachi Gajanan Rajguru
Janhvi Sandeep Tongire
Aarya Mahesh Mhaske
UNDER THE GUIDANCE OF
Mrs. S. A. Samrat
A
MICRO-PROJECT
REPORT ON
“Page replacement algorithm”
FOR THE DIPLOMA IN COMPUTER ENGINEERING
SUBMITTED BY
Prachi Gajanan Rajguru
Janhvi Sandeep Tongire
Aarya Mahesh Mhaske
3
ACKNOWLEDGEMENT
We would like to express our thanks to the people who have helped us most
throughout our project. We would like to express our sincere thanks to the principal
of CSMSS College of Polytechnic Dr. Shashikant. R. Dikale for being always with
us. A motivator We are thankful to the H.O.D. of Computer Engineering
Department Ms. R. S. Pophale mam for her kind support. We are grateful to our
Project Guide Mrs. S. A. Samrat mam for nonstop support and continuous
motivation for the project. Her help made us possible to complete our project with
all accurate information. A special thanks of our goes to our friends who helped us
in completing the project, where they all exchanged their own interesting ideas. We
wish to thanks our parents for their personal support or attention who inspired us to
go our own way. Finally, we would like to thank God who made all things possible
for us till the end.
Mrs. S. A. Samrat
(Project Guide)
4
INDEX
2 Rationale 08-09
7 Applications of Micro-Project 15
8 Conclusion 16
9 Reference 16
5
Micro-Project Proposal
6
4.0 RESOURCES REQUIRED:
1. Computer Windows11 1
2. Operating System _ _
Planned
Planned Name of
Sr.
Details of activity Finish Responsible
No. Start date
date Team Members
Select the topic about the
1. 01.08.2024 10.08.2024 ALL
micro-project.
Collect information
15.08.2024 25.08.2024 ALL
about our topic.
2.
To understand concept
3. of topic. 26.08.2024 15.09.2024 ALL
To prepare project
5. 14.10.2024 25.10.2024 ALL
Report
7
Rationale
The rationale for implementing a page replacement algorithm in an operating system is grounded in several key
factors that contribute to efficient memory management and overall system performance. Here are the main
points:
1. Limited Physical Memory
Physical memory (RAM) is a finite resource, and applications often require more memory than what is
physically available. Page replacement algorithms help manage this limitation by determining which
pages to keep in memory and which to evict.
4. Performance Optimization
Different workloads have varying access patterns. A well-chosen page replacement algorithm adapts to
these patterns, optimizing memory access and improving overall system throughput and latency.
8
6. Resource Fairness
Algorithms can ensure fair allocation of memory resources among competing processes, preventing
scenarios where one process monopolizes memory, leading to inefficiencies and degraded performance
for others.
9
Aims and benefits of Micro-Project
Micro-Project Aim:
1. Minimize Page Faults
2. Optimize Memory Utilization
3. Enhance System Performance
4. Adapt to Access Patterns
5. Ensure Fair Resource Allocation
6. Support Multitasking
7. Maintain Stability and Security
Benefits of Micro-Project:
1. Improved System Performance
2. Optimal Memory Utilization
3. Reduced Disk I/O
4. Support for Large Applications
5. Enhanced Multitasking
6. Adaptability to Workload Changes
7. Fair Resource Distribution
8. Process Isolation and Security
9. Scalability
10
Literature Review
Introduction
Page replacement algorithms are integral to modern operating systems, facilitating efficient memory
management in environments where physical memory is limited. This literature review explores key
algorithms, their effectiveness, performance metrics, and the evolution of these techniques over time.
1. Fundamental Concepts
Early work on page replacement algorithms was primarily focused on understanding the trade-offs between
different strategies. The seminal work by Belady (1966) introduced the concept of page faults and established
the framework for evaluating page replacement algorithms, including the notion of the "Belady's Anomaly,"
where increasing the number of page frames can lead to an increase in page faults for certain algorithms.
2. Common Algorithms
Several algorithms have been developed and widely studied:
Least Recently Used (LRU): LRU keeps track of page usage over time, evicting the least recently
accessed page. Research, such as that by Denning (1970), demonstrated LRU's effectiveness in
minimizing page faults compared to simpler algorithms like FIFO.
First-In-First-Out (FIFO): FIFO is one of the simplest algorithms, evicting the oldest page first. While
easy to implement, studies, including those by Ousterhout (1988), indicate that FIFO often performs
poorly in comparison to LRU and other more sophisticated strategies.
Optimal Page Replacement: The optimal algorithm, which replaces the page that will not be used for
the longest time in the future, serves as a benchmark for other algorithms. While theoretical and not
implementable in practice, it sets an upper bound for performance (Baker et al., 1980).
Least Frequently Used (LFU): LFU prioritizes pages based on usage frequency. Research shows that
LFU can outperform LRU in certain scenarios, particularly with stable access patterns (Shenoy &
Smith, 1990).
3. Hybrid Approaches
Recent studies have explored hybrid algorithms that combine elements of various strategies to improve
performance. For instance, the Working Set model (Denning, 1968) adapts LRU by considering the locality of
reference, focusing on a set of pages actively used by a process.
11
4. Evaluation Metrics
Performance evaluation of page replacement algorithms typically considers:
Page Fault Rate: The percentage of memory accesses that result in a page fault.
Throughput: The number of processes completed in a given time.
Latency: The time taken for processes to complete, influenced by memory access times.
Research by Rojas et al. (2009) emphasized the importance of benchmarking algorithms under varying
workloads to better understand their performance characteristics.
5. Emerging Trends
With the advent of cloud computing and large-scale data processing, newer algorithms that accommodate
distributed systems have emerged. For instance, algorithms designed for non-volatile memory and solid-state
drives are being researched to reduce write amplification and increase endurance (Wu et al., 2013).
6. Real-World Applications
Several operating systems implement these algorithms. For example, Linux employs a variant of LRU with a
"clock" algorithm for efficient page replacement, balancing performance and resource usage (Linux Kernel
Documentation, 2020).
12
Actual Methodology Followed
Page replacement algorithms are used in operating systems to manage the limited physical memory
(RAM) when a page fault occurs—this happens when a program tries to access a page that is not
currently in memory. These algorithms decide which page to evict to make room for the new page.
Common Algorithms:
1. Least Recently Used (LRU):
Replaces the page that has not been used for the longest time.
Advantage: Generally effective in minimizing page faults.
Disadvantage: Requires tracking page usage history, which can be complex.
2. First-In-First-Out (FIFO):
Evicts the oldest page in memory.
Advantage: Simple to implement.
Disadvantage: Can lead to suboptimal performance (e.g., Belady's Anomaly).
5. Clock Algorithm:
A practical approximation of LRU using a circular queue with a pointer to track pages.
Advantage: More efficient than true LRU with lower overhead.
Disadvantage: May not always make the best choice for eviction.
6. Second Chance:
13
An enhancement of FIFO that gives pages a "second chance" if their reference bit is set.
Advantage: Balances FIFO and LRU effectiveness.
Disadvantage: Still relatively simplistic.
The evolution of page replacement algorithms reflects the ongoing challenges in memory management within
operating systems. While traditional algorithms like LRU and FIFO remain relevant, emerging applications
and technologies continue to drive innovation in this area. Future research will likely focus on hybrid
approaches and optimizations for modern computing environments, including cloud and distributed systems.
14
1. Understanding Memory Management Concepts
2. Algorithm Analysis
3. Implementation Skills
4. Problem-Solving Abilities
5. Performance Evaluation
6. Critical Thinking
7. Adaptation to Real-World Scenarios
8. Collaboration and Communication
9. Research and Development
10. Documentation and Reporting
Applications
Conclusion
15
Page replacement algorithms play a critical role in managing memory in operating systems, particularly in
systems with limited physical memory. The choice of algorithm can significantly impact performance,
affecting how well the system runs under various workloads. Understanding these algorithms helps in
optimizing system performance and resource management. Each algorithm has its strengths and
weaknesses, making it essential to select the appropriate one based on the specific application and
workload characteristics.
Page replacement algorithms are crucial for optimizing memory management in operating systems,
impacting overall system performance. The choice of algorithm should be based on the specific workload
and access patterns to achieve the best results.
References
https://www.win.tue.nl/~wstomv/edu/2ip30/references
https://faculty.salisbury.edu/~dxdefino/cs450/referenc.htm
https://ait.libguides.com/c.php?g=280060&p=1866747
https://scialert.net/guide2.php?issn=1819-4311&id=28
16