|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--FTE
An FTE is a frame table entry.
Field Summary | |
int |
frameNumber
frameNumber is the frame number for this frame table entry. |
PCB |
owner
owner is the process that owns the frame that is described by this frame table entry. |
int |
pageNumber
pageNumber is the page number that is assigned to the frame that is described by this frame table entry. |
PTE |
pte
pte is the page table entry that uses the frame that is described by this frame table entry. |
Constructor Summary | |
FTE(int fn)
new FTE(fn) returns a new frame table entry for frame number fn. |
Method Summary | |
void |
assign(PCB proc,
PTE pte,
int pageNum)
fte.assign(proc, pte, pageNum) sets proc as the owner of fte, sets pte as its page table entry, and sets pageNum as its page number. |
PCB |
getOwner()
fte.getOwner() returns the process that owns fte, or null if fte is free. |
int |
getPageNumber()
fte.getPageNumber() returns the page number for the page that is assigned to fte, or -1 if fte is free. |
PTE |
getPTE()
fte.getPTE() returns the page table entry for the page that is assigned to fte, or null if fte is free. |
boolean |
isFree()
fte.isFree() returns true if fte is not assigned to any process. |
boolean |
isReferenced()
fte.isReferenced() returns true if fte is assigned to a process and it has been referenced recently. |
void |
print(int frameNum)
fte.print(frameNum) writes fte to System.out in tabular form. |
static void |
printHeader()
FTE.printHeader() writes a header for tables containing fte entries printed with the print() method. |
void |
resetReferenceBit()
fte.resetReferenceBit() resets the reference bit in the PTE that uses fte. |
void |
setFree()
fte.setFree() makes fte free. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public int frameNumber
public PCB owner
public PTE pte
public int pageNumber
Constructor Detail |
public FTE(int fn)
Method Detail |
public PCB getOwner()
public PTE getPTE()
public int getPageNumber()
public void setFree()
Preconditions: fte.isFree() is false.
public boolean isFree()
public void resetReferenceBit()
Preconditions: fte.isFree() is false.
public boolean isReferenced()
public void assign(PCB proc, PTE pte, int pageNum)
Preconditions: fte.isFree() is true.
public static void printHeader()
public void print(int frameNum)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |