0% found this document useful (0 votes)
7 views

Micro OSY

awrjztrhvcvsfac

Uploaded by

sachingunjal401
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views

Micro OSY

awrjztrhvcvsfac

Uploaded by

sachingunjal401
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 16

A

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

DEPARTMENT OF COMPUTER ENGINEERING,


CSMSS COLLAGE OF POLYTECHNIC,
CHH.SAMBHAJI NAGAR, MAHARASHTRA, INDIA

MAHARASHTRA STATE BOARD


OF TECHNICAL EDUCATION, MUMBAI

ACADEMIC YEAR 2024-25


CHHATRAPATI SHAHU MAHARAJ
SHIKSHAN SANSTHA’S
COLLEGE OF POLYTECHNIC

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

COMPUTER ENGINEERING THIRD YEAR


SUBMITTED TO
COMPUTER ENGINEERING DEPARTMENT
YEAR 2024-2025
CERTIFICATE OF COMPLITION

This is to certify that Following Students of fifth semester of Diploma in


Computer Engineering of Institute CSMSS College of Polytechnic (code:1152)
have completed the Micro Project satisfactionly in subject OSY (22516) for the
academic year 2024-2025 as prescribed in the curriculum.
Place: Chh. Sambhaji nagar DATE:-

SR.NO ENROLLMENT NO NAME OF STUDENT

1 2211520128 Janhvi Sandeep Tongire

2 2211520106 Prachi Gajanan Rajguru

2 2211520092 Aarya Mahesh Mhaske

Mrs. S. A. Samrat Ms. R. S. Pophale Dr. Shashikant. R. Dikale

(Course Teacher) (H.O.D) (Principal)

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.

Sr. No ENROLLMENT NO NAME OF STUDENT

1 2211520106 Prachi Gajanan Rajguru

2 2211520128 Janhvi Sandeep Tongire

3 2211520092 Aarya Mahesh Mhaske

Mrs. S. A. Samrat
(Project Guide)

4
INDEX

SR.NO TITLE PAGE.NO

1 Micro-Project Proposal 06-07

2 Rationale 08-09

3 Aims and benefits of Micro-Project 10

4 Literature Review 11-12

5 Actual Methodology Followed 13-14

6 Skill Development / Learning Outcomes from Micro-Project 15

7 Applications of Micro-Project 15

8 Conclusion 16

9 Reference 16

5
 Micro-Project Proposal

TITLE : Page replacement algorithm

1.0 AIMS /BENEFITS OF THE MICRO PROJECT:


1) Efficient Memory Utilization
2) Balance Performance and Overhead
3) Enhanced Resource Management
4) Improved System Performance

2.0 COURSE OUTCOMES ADDRESSED :


1) System Calls and APIs: Recognize the role of system calls for application interaction with the OS.
Proficiency in Functions and Scope
2) Process Management: Analyze and implement process scheduling algorithms.
3) File Systems: Understand file system structure and operations.
4) Performance Evaluation: Assess system performance using relevant metrics.
5) Design Components: Design and implement basic OS components or simulations.

3.0 PROPOSED METHODOLOGY :


1) Define Requirements
2) Select a Page Replacement Algorithm
3) Data Structures Setup
4) Implement the Page Replacement Logic
5) Integrate with Memory Management Unit (MMU)
6) Testing and Validation
7) Optimization
8) Documentation
9) Iterative Improvement
10) Deployment and Monitoring

6
4.0 RESOURCES REQUIRED:

Sr. No. Name of resources Specification Quantity Remarks

1. Computer Windows11 1

2. Operating System _ _

5.0 ACTION PLANS:


.

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

Analysis, according and


4. debugging 20.09.2024 13.10.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.

2. Virtual Memory Management


 Virtual memory allows systems to use disk space as an extension of RAM, enabling larger applications
to run than the physical memory would otherwise allow. Effective page replacement ensures that
frequently accessed pages are readily available, minimizing the need to access slower disk storage.

3. Minimizing Page Faults


 A page fault occurs when a process tries to access a page that is not currently in memory. Page
replacement algorithms aim to minimize these faults, as they can lead to significant delays due to the
time required to retrieve pages from disk. Fewer page faults enhance the responsiveness of applications.

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.

5. Process Isolation and Security


 By managing memory effectively, page replacement algorithms help isolate processes, preventing one
process from interfering with the memory space of another. This contributes to system stability and
security.

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.

7. Adaptability to Changing Workloads


 As workloads change, page replacement algorithms can adjust to optimize performance dynamically.
This adaptability is crucial in multi-tasking environments where access patterns can vary widely.

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).

3. Optimal Page Replacement:


 Replaces the page that will not be used for the longest time in the future.
 Advantage: Provides the lowest possible page fault rate.
 Disadvantage: Not implementable in practice since it requires future knowledge of page references.

4. Least Frequently Used (LFU):


 Replaces the page that has been used the least number of times.
 Advantage: Keeps frequently accessed pages in memory.
 Disadvantage: Can suffer from cache pollution, retaining rarely used pages.

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.

 Skill Development / Learning Outcomes from Micro-Project

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

1. Virtual Memory Management


2. Multitasking Environments
3. Database Management Systems
4. Embedded Systems
5. Cloud Computing
6. Operating System Kernels
7. High-Performance Computing
8. Web Servers

 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

You might also like