cse378.pagetable
Class PageTable
java.lang.Object
cse378.pagetable.PageTable
public class PageTable
- extends java.lang.Object
Constructor Summary |
PageTable(int maxSize)
Create a page table with a fixed number of physical pages |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
pages
java.util.HashMap<cse378.address.VirtualPage,PageTableEntry> pages
recent
java.util.LinkedList<PageTableEntry> recent
maxPages
final int maxPages
pageCount
int pageCount
hits
long hits
cleanMisses
long cleanMisses
dirtyMisses
long dirtyMisses
stat
Status stat
tlbEvictionAddress
cse378.address.VirtualPage tlbEvictionAddress
PageTable
public PageTable(int maxSize)
- Create a page table with a fixed number of physical pages
- Parameters:
maxSize
- number of physical pages available
initStatus
protected void initStatus(cse378.address.VirtualAddress addr)
- Initialize the page table status
- Parameters:
addr
- address of current access
load
public cse378.address.PhysicalPage load(cse378.address.VirtualAddress addr)
- Get a physical page mapping from the page table
If none is found, one is created
- Parameters:
addr
- VirtualAddress of the desired page- See Also:
AbstractCache#load(PhysicalAddress)
getLRU
private PageTableEntry getLRU()
setMRU
public void setMRU(PageTableEntry pte)
pendingTLBEviction
public cse378.address.VirtualPage pendingTLBEviction()
store
public cse378.address.PhysicalPage store(cse378.address.VirtualAddress addr)
- Get a physical page mapping from the page table
If none is found, one is created, (and marked dirty)
- Parameters:
addr
- VirtualAddress of the desired page
getStatus
public Status getStatus()
getCleanMisses
public long getCleanMisses()
getDirtyMisses
public long getDirtyMisses()
getCounts
public java.lang.String getCounts()