|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--MMU
The MMU class represents the memory management unit hardware in a computer system.
Field Summary | |
static int |
FRAME_COUNT
MMU.FRAME_COUNT is the number of page frames in physical memory. |
static int |
MEMORY_SIZE
MMU.MEMORY_SIZE is the number of bytes in physical memory. |
static int |
NONE
MMU.NONE is the int code for disallowing all access. |
static int |
OFFSET_BITS
MMU.OFFSET_BITS is the number of page offset bits in a memory address. |
static int |
PAGE_SIZE
MMU.PAGE_SIZE is the size of a memory page. |
static int |
READ
MMU.READ is the int code for read access. |
static int |
RO
MMU.RO is the int code for allowing read-only access. |
static int |
RW
MMU.RW is the int code for allowing read-write access. |
static int |
WRITE
MMU.WRITE is the int code for write access. |
Method Summary | |
static int |
getAdjustedSize(int sz)
MMU.getAdjustedSize(sz) returns the smallest integer multiple of MMU.PAGE_SIZE that is greater than or equal to sz. |
static Page |
getPage(int frameNum)
MMU.getPage(frameNum) returns the contents of the frame numbered frameNum. |
static void |
putPage(int frameNum,
Page pg)
MMU.putPage(frameNum, pg) puts the contents of pg into the frame numbered frameNum. |
static void |
read(int addr)
MMU.read(addr) simulates a memory read at address addr. |
static void |
setPTBR(PageTable pt)
MMU.setPTBR(pt) sets the page table base register to point to pt. |
static void |
write(int addr)
MMU.write(addr) simulates a memory write at address addr. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int OFFSET_BITS
public static final int PAGE_SIZE
This definition should not be changed. To change the page size, change the OFFSET_BITS definition.
public static final int MEMORY_SIZE
public static final int FRAME_COUNT
This definition should not be changed. To change the number of pages, change the MEMORY_SIZE definition or the PAGE_SIZE definition.
public static final int READ
public static final int WRITE
public static final int NONE
public static final int RO
public static final int RW
Method Detail |
public static int getAdjustedSize(int sz)
public static void setPTBR(PageTable pt)
public static void read(int addr)
public static void write(int addr)
public static void putPage(int frameNum, Page pg)
public static Page getPage(int frameNum)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |