Presentation5 3
Presentation5 3
Submitted by
ABHIRAMI S 20193281506202
GOWSHIKA P 20193281506212
LAVANYA N 20193281506221
SHALINI B 20193281506234
SUBHA I 20193281506237
Guided by
A virtual memory system requires efficient page replacement algorithms to make a decision
which pages to evict from memory in case of a page fault.
Many algorithms have been proposed for page replacement.
Each algorithm is used to design on which free page frame a page is placed and tries to minimize
the page fault rate while incurring minimum overhead.
In this we are going see about one of the type of page replacement algorithm.
FIFO which is also called First In First Out is one of the types of replacement algorithms.
This algorithm is used in a situation where an operating system replaces an existing page with the
help of memory by bringing a new page from the secondary memory.
FIFO is the simplest among all algorithms which are responsible for maintaining all the pages in the
queue for an operating system and also keeping track of all the pages in a queue.
INTRODUCTION
Page replacement algorithms decide which memory pages to page out, sometimes called swap out, or write to disk, when
the page of memory needs to be allocated.
Page replacement happens when a requested page is not in memory (page fault) and a free page cannot be used to
satisfy the allocation, either because there are none, or because the number of free pages is lower than some threshold.
When the page that was selected for replacement and paged out is referenced again it has to be paged in, and this involves
waiting for I/O completion.
This determines the quality of the page replacement algorithm: the less time waiting for page-ins, the better the
algorithm.
A page replacement algorithm looks at the limited information about accesses to the pages provided by hardware, and
tries to guess which pages should be replaced to minimize the total number of page misses, while balancing this with
the costs of the algorithm itself.
The older pages are kept in the front and the newer ones are kept at the end of the queue.
Pages that are in the front are removed first and the pages which are demanded are added.
Whenever CPU raises a page fault, OS does not immediately bring the required page from the virtual space.
If there is a free frame available, clear a frame to accommodate the new page.
Any page cannot be removed randomly, and there should be some logic or algorithm in replacing the pages in the
memory.
SYSTEM REQUIREMENTS
Hardware Requirement:
System - Elite Group
Hard disk - 40 GB
Floppy drive - 1.44 MB
Keyboard - Foxin
Monitor - Compaq
Mouse - Logitech
RAM - 256 MB
Software Specifications:
Operating system - Windows
Front End - C
IMPLEMENTATION
Page replacement algorithm like FIFO are used when there is a new page request and there is not
enough space in the main memory to allocate the page.
Page replacement algorithm decides which page it should be replace so that it can allocate the
memory for the new page.
FIFO is an abbreviation for first in first out .
It is the method for handling data structures where the first element is processed first and the newest element is
processed last.
A page fault is another important concept in page replacement algorithm.
A page fault occurs when a page requested by a program is not present in the main memory.
The operating system retrieves the page from the secondary or virtual memory to the main memory.
In modern days operating system, a large number of page faults can cause the program to crash or
terminate expectedly.
The page that is not in the main memory is know as page fault.
On the page fault, the frame that has been in memory the longest is replaced.
DATA FLOW DIAGRAM
A Data Flow Diagram (DFD) is a graphical representation of the “flow” of data through an information system,
modelling it’s process aspects.
It is often used as a preliminary step to create an overview of the system without going into great detail,
which can later be elaborated. It maps out the flow of information for any process or system.
It uses defined symbols like rectangles, circles and arrows, plus ,short text lables, to show data input , storage
points.
FUTURE ENHANCEMENT
FIFO seeks to sell older products first so that the business is less likely to lose money when
the products expire or become obsolete.
The cost of producing goods will rise over time, businesses using FIFO are consider more
profitable.
CONCLUSION
FIFO which is also called First In First Out is one of the types of replacement algorithms.
This algorithm is used in a situation where an operating system replacing an existing page with the help of
memory by bringing a new page from the secondary memory.
FIFO is the simplest among all the algorithms which are responsible for maintaining all the pages in a queue
for an operating system and keeping track of all the pages in a queue.
The older pages are kept in the front and the newer ones are kept at the end of the queue.
Pages that are in the front are removed first and the pages which are demanded are added.
A good page replacement algorithm reduces the number of page faults.
SCREENSHOT
BIBLIOGRAPHY
William Stallings, Ph.D., “Operating Systems / Internals and Design Principles”, pages 75-76, 406-408,
Prentice Hall, 2001.
Englander, I., 2003. The Architecture of Computer Hardware and Systems Software; An Information
Technology Approach, 3rd Edition, John Wiley & Sons, Inc.
Yavatkar. R. and K . Lakshman,1995. A FIFO Page replacement Scheduling Algorithm for Continuous Media
Applications, In Proceedings of the 5thInternational Workshop on Network and Operating System Support for
Digital Audio And Video, 210-213.
I. E.W. Gierinl and T. P. Baker, “Page replacement scheduling of real-time Programs implemented as periodic
Ada tasks,” Ada Let, vol. XIV, pp. 54-73, (1994).
Shahzad, B., Afzal, M.T.: ,”First In First out page replacement algorithm”. In: The 6 th Jordanian Inr. Electrical
an Jordan (2006).
M.Kaladevi M.C.A. M.Phil., and Dr.S.Sathiyabama, M.Sc.,M.Phil.,Ph. D, “Page replacement Scheduling
Algorithms For Real Time Task”, International Journal of Advances in Science and Technology, Vol. 1,
A .S. Sumant ,and P.M .Chawan,”Virtual Memory Management Techniques in 2.6 Linux Kernel and challenges”,
IASCIT International Journal of Engineering and Technology.pop.157-160,201.
Heiokki Paajanen, Page replacement in operating system memory Management, Master’s thesis, University of
Jyvaskyla,2007
THANK YOU