nachos.machine
Class SegmentDescriptor

java.lang.Object
  extended by nachos.machine.SegmentDescriptor

public final class SegmentDescriptor
extends java.lang.Object

This class defines an entry in a segment table. Each entry contains base and size registers, which define a mapping from a range of virtual addresses to a range of physical addresses. In addition, there are some extra bits for access control (valid and read-only). A certain number of the most-significant bits of the virtual address are used as the segment selector, depending on the configured size of the segment table (which must be a power of two). The remaining bits are used as the offset within the selected segment.


Field Summary
 long base
          The base address of the segment in physical memory.
 boolean readOnly
          If this bit is set, the user program is not allowed to modify the contents of the segment.
 long size
          The size of the segment in bytes.
 boolean valid
          If this bit is not set, the segment is ignored.
 
Constructor Summary
SegmentDescriptor()
           
 
Method Summary
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

base

public long base
The base address of the segment in physical memory.


size

public long size
The size of the segment in bytes.


valid

public boolean valid
If this bit is not set, the segment is ignored. (In other words, the entry hasn't been initialized.)


readOnly

public boolean readOnly
If this bit is set, the user program is not allowed to modify the contents of the segment.

Constructor Detail

SegmentDescriptor

public SegmentDescriptor()