Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- \documentclass[10pt]{article}
- \usepackage {algorithm}
- \usepackage {algorithmic}
- \begin{document}
- \begin{algorithm}
- \vspace{2mm}
- \textbf{VARIABLES AND STRUCTURES}\\
- $x$: references block, \textbar B \textbar: total cache size\\
- $T1$,$T2$: partitions for a disk and a flash memory\\
- $cumulated\_ref\_count$: cumulated reference count\\
- \textbf{MAIN ALGORITHM}
- \begin{algorithmic}[1]
- \STATE Initialize required variables and structures
- \STATE Determine the access pattern of each block if it is a sequential or random at every reference of blocks
- \STATE Increase $cumulated\_ref\_count$
- \STATE If a cache hit occurs in $T1$ (or $T2$)
- \STATE Move the block to the MRU in $T1$ (or $T2$)
- \STATE \hspace{4mm} Execute \textbf{H\_update}
- \STATE Else
- \STATE \hspace{4mm}Execute \textbf{List\_update}
- \STATE If $cumulated\_ref\_count = W$
- \STATE \hspace{4mm}Execute the \textbf{dynamic partitioning algorithm} in Fig. 4
- \end{algorithmic}
- \end{algorithm}
- \end{document}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement