0% found this document useful (0 votes)
12 views33 pages

LRU and FIFO Page Replacement Algorithms

Uploaded by

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

LRU and FIFO Page Replacement Algorithms

Uploaded by

abhishek
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

VISVESVARAYA TECHNOLOGICAL UNIVERSITY

BELAGAVI - 590 018, KARNATAKA.

COMPUTER GRAPHICS
MINI PROJECT REPORT
ON

“LRU AND FIFO


PAGE REPLACEMENT ALGORITHMS”

Submitted in the partial fulfillment of requirements


FOR
COMPUTER GRAPHICS LABORATORY (18CSL67)
Submitted by

HARSHA A SINDHE 4BD20CS034


KAVYA M M 4BD20CS046

PROJECT GUIDES:

Prof. Madhuri Deekshith S B.E, [Link], Prof. Gangamma H B.E, [Link],


Asst. Professor, Dept. of CS&E Associate Professor, Dept. of CS&E

2022-2023
Department of Computer Science and Engineering
Bapuji Institute of Engineering & Technology
Davangere- 577004
Bapuji Institute of Engineering and Technology Davangere-577004

Department of Computer Science and Engineering

CERTIFICATE
This is to certify that HARSHA A SINDHE, KAVYA M M bearing USN 4BD20CS034,
4BD20CS046 respectively of Computer Science and Engineering department have satisfactorily
submitted the mini project report entitled “LRU AND FIFO PAGE ”. The report of the project has
been approved as it satisfies the academic requirements in respect of project work prescribed for the
academic year 2022-23.

Project Guide 1 Project Guide 2

Prof. Madhuri Deekshith S B.E, M. Tech., [Link] H B.E, [Link],


Asst. Professor Asst. Professor
Department of CS&E, Department of CS&E,
B.I.E.T, Davangere B.I.E.T, Davangere

Head of Department

Dr. Nirmala C.R Ph.D.


Prof. & Head,
Department of CS&E,
B.I.E.T, Davangere

Date: Signature of Examiners:

Place: Davangere
(1)

(2)
ACKNOWLEDGEMENT

Salutations to our beloved and highly esteemed institute, “BAPUJI INSTITUTE OF


ENGINEERING AND TECHNOLOGY” for having well qualified staff and labs furnished with
necessary equipment’s.

We express our sincere thanks to our guide Prof. Madhuri Deekshith S and Prof. Gangamma H for
giving us constant encouragement, support and valuable guidance throughout the course of the project
without whose stable guidance this project would not have been achieved.

We express whole hearted gratitude to Dr. NIRMALA C R who is our respectable HOD ofComputer
Science & Engineering Department. We wish to acknowledge her help who made our task easy by
providing with her valuable help and encouragement.

We also express our whole hearted gratitude to our principal, Dr. H B ARAVIND, for his moral
support and encouragement.

We would like to extend my gratitude to all staff of COMPUTER SCIENCE AND ENGINEERING
DEPARTMENT for the help and support rendered to me. We have benefited a lotfrom the feedback,
suggestions given by them.

We would like to extend our gratitude to all our family members and friends especially for their advice
and moral support.

HARSHA A SINDHE (4BD20CS034)


KAVYA M M (4BD20CS046)
Vision and Mission of the Institute
Vision
“To be a center of excellence recognized nationally internationally, in distinctive areas of
engineering education and research, based on a culture of innovation and invention.”
Mission
“BIET contributes to the growth and development of its students by imparting a broad based
engineering education and empowering them to be successful in their chosen field by inculcating in
them positive approach, leadership qualities and ethical values.”

Vision and Mission of the Computer Science and Engineering Department


Vision
To be a center-of-excellence by imbibing state-of-the-art technology in the field of Computer
Science and Engineering, thereby enabling students to excel professionally and be ethical.
Mission
1. Adapting best teaching and learning techniques that cultivates Questioning and Reasoning
culture among the students.
2. Creating collaborative learning environment that ignites the critical thinking in students and
leading to the innovation.
3. Establishing Industry Institute relationship to bridge skill gap and make them industry ready
and relevant.
4. Mentoring students to be socially responsible by inculcating ethical and moral values.

1. Program Educational Outcomes (PEOs):


PEO1 To apply skills acquired in the discipline Computer Science and Engineering for
solving societal and industrial problems with apt technology intervention.
PEO2 To continue their career in industry or to pursue higher studies and research.

PEO3 To become successful entrepreneurs, innovators to design and develop software


products on services that meets the societal, technical and business challenges.
PEO4 To work in the diversified environment by acquiring leadership qualities with
effective communication skills accompanied by professional and ethical values.
2. Program Specific Outcomes (PSOs):
PSO1 Analyze and develop solutions for problems that are complex in nature by
applying the knowledge acquired from the core subject of this program.
PSO2 Ability to develop Secure, Scalable, Resilient and distributed applications for
industry and societal requirements.
PSO3 Ability to learn and apply the concepts and construct of emerging technologies
like secure Artificial Intelligence, Machine learning, Big Data, Cloud Computing,
IoT, Cloud computing, etc. for any real-time problems.

1. Course Outcomes:

CO1 Implement the concepts of computer graphics primitives like lines, polygons
triangles, cubes and 3D gaskets.

CO2 Applying the different lighting and shading properties.

CO3 Animate real world problems using OpenGL API’s.

CO4 Design and implement computer graphics applications (mini project) using OpenGL
ABSTARCT

In this project, we created a Graphics animation to demonstrate LRU Page Replacement Algorithm.
A good approximation to the optimal algorithm is based on the observation that pages that have
been heavily used in the last few instructions will probably be heavily used again in the next few.
Conversely, pages that have not been used for ages will probably remain unused for a long time.
This idea suggests a realizable algorithm: when a page fault occurs, throw out the page that has been
unused for the longest time. This strategy is called LRU (Least Recently Used) paging.
Also, we created a Graphics animation to demonstrate FIFO Page Replacement Algorithm. This is
the simplest page replacement algorithm. In this algorithm, the operating system keeps track of all
pages in the memory in a queue, the oldest page is in the front of the queue. When a page needs to
be replaced page in the front of the queue is selected for removal.
CONTENTS

CHAPTER 1: INTRODUCTION .............................................................. 1


1.1 LRU AND FIFO ............................................................................................................................... 1

1.2 OPENGL ................................................................................................................................................. 1

1.3 HISTORY ............................................................................................................................................... 2

1.4 FEATURESOFOPENGL ........................................................................................................................ 2

1.5 BASIC OPENGOPERATION ................................................................................................................4

1.6 OPENGL INTERFACE ....................................................................................................................... 5

1.7 GRAPHICS FUNCTIONS .................................................................................................................... 6

1.8 DATA TYPES......................................................................................................................................... 8

CHAPTER 2: SYSTEM REQUIREMENTS ........................................ 09


2.1 SOFTWARE REQUIREMTS ............................................................................................................ 9

2.2 HARDWAREREQUIREMTS ........................................................................................................... 9

CHAPTER 3: SYSTEM DESIGNS ........................................................ 10


3.1 INITIALIZATION ............................................................................................................................. 10

3.2 DISPLAY ............................................................................................................................................ 10

3.3 FLOWCHART ..................................................................................................................................... 11

CHAPTER 4: IMPLEMENTATION..................................................... 12
4.1 OVERVIEW ...................................................................................................................................... 12

4.2 USER INTERFACE ........................................................................................................................... 12

4.3 STRUCTURE..................................................................................................................................... 12

CHAPTER 5: SNAPSHOTS .................................................................. 20


CONCLUSION
REFERENCES
CONCLUSION

• In summary, the LRU algorithm takes into account the recency of page usage
and aims to minimize page faults by replacing the least recently used page.
• On the other hand, the FIFO algorithm simply replaces the page that has been in
memory the longest, regardless of usage patterns. The choice between LRU and
FIFO depends on the specific requirements and characteristics of the system,
including the workload patterns, system resources, and performance objectives.
REFERENCES

BOOKS:

[1] Edward Angel: Interactive Computer Graphics A Top-Down Approach with


OpenGL, 5 edition, Pearson Education, 2008.

[2] Donald Hearn and Pauline Baker: Computer Graphics-OpenGL Version, 3d


Edition, Pearson 2004.

LINKS:

[1] [Link]

[2] [Link]
APPENDIX

• GL: Graphics Library

• GLU: Graphics Utility Library

• GLUT: OpenGL Utility Tool kit

• 2D: Two dimensional

• 3D:Three dimensional

• RAM: Random Access Memory

You might also like