cse378.pagetable
Class PageTable

java.lang.Object
  extended by cse378.pagetable.PageTable

public class PageTable
extends java.lang.Object


Field Summary
(package private)  long cleanMisses
           
(package private)  long dirtyMisses
           
(package private)  long hits
           
(package private)  int maxPages
           
(package private)  int pageCount
           
(package private)  java.util.HashMap<cse378.address.VirtualPage,PageTableEntry> pages
           
(package private)  java.util.LinkedList<PageTableEntry> recent
           
(package private)  Status stat
           
(package private)  cse378.address.VirtualPage tlbEvictionAddress
           
 
Constructor Summary
PageTable(int maxSize)
          Create a page table with a fixed number of physical pages
 
Method Summary
 long getCleanMisses()
           
 java.lang.String getCounts()
           
 long getDirtyMisses()
           
private  PageTableEntry getLRU()
           
 Status getStatus()
           
protected  void initStatus(cse378.address.VirtualAddress addr)
          Initialize the page table status
 cse378.address.PhysicalPage load(cse378.address.VirtualAddress addr)
          Get a physical page mapping from the page table If none is found, one is created
 cse378.address.VirtualPage pendingTLBEviction()
           
 void setMRU(PageTableEntry pte)
           
 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)
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

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
Constructor Detail

PageTable

public PageTable(int maxSize)
Create a page table with a fixed number of physical pages

Parameters:
maxSize - number of physical pages available
Method Detail

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()