WUT_Computer_Science/EOPSY/lab4/report/report.tex
2022-05-06 11:42:53 +02:00

49 lines
1.6 KiB
TeX

\documentclass{article}
\usepackage{listings}
\usepackage{hyperref}
\usepackage{graphicx}
\usepackage{float}
\usepackage[margin=1.25in]{geometry}
\begin{document}
\title{EOPSY Lab 4 Report}
\author{Krzysztof Rudnicki, 307585}
\date{\today}
\maketitle
\section{Introduction}
\paragraph{First in First out}
We use FIFO (First in First out) page replacement algorithm for those laboratories as indicated
by the PageFault.java file line 18
\begin{figure}[H]
\caption{PageFault.java file}
\begin{lstlisting}[language=Java]
[...]
public class PageFault {
/**
* The page replacement algorithm for the memory management sumulator.
* This method gets called whenever a page needs to be replaced.
* <p>
* The page replacement algorithm included with the simulator is
* FIFO (first-in first-out). A while or for loop should be used
* to search through the current memory contents for a canidate
* replacement page. In the case of FIFO the while loop is used
* to find the proper page while making sure that virtPageNum is
* not exceeded.
[...]
\end{lstlisting}
\end{figure}
All pages are stored in memory in a queue. Oldest page (First that came in) is
in front of this queue. \\ When we need to replace the page we remove the page that
is first in queue (so the one that came in as a first one, first in, first out)
\cite{Page Replacement Algorithms}
\paragraph{Mapping}
\section{Finishing comments}
\begin{thebibliography}{9}
\bibitem{Page Replacement Algorithms}
\href{https://www.geeksforgeeks.org/page-replacement-algorithms-in-operating-systems/}{[Geeks
for Geeks page replacament algorithms]}
\end{thebibliography}
\end{document}