Class PCB

java.lang.Object
  |
  +--PCB

public class PCB
extends java.lang.Object

A PCB represents a user process.


Constructor Summary
PCB(int tid, Image im)
          new PCB(tid, im) returns a new PCB with process identifier tid and executable image im.
 
Method Summary
 java.lang.String getDescription()
          proc.getDescription() returns a description of proc.
 Image getImage()
          proc.getImage() returns the executable image for proc.
 PageTable getPageTable()
          proc.getPageTable() returns the page table for proc.
 int getPID()
          proc.getPID() returns the process identifier for proc.
 int getTimeLeft()
          proc.getTimeLeft() returns the CPU time remaining until proc has completed execution.
 boolean isTerminated()
          proc.isTerminated() returns true if proc has terminated execution.
 void run(int t)
          proc.run(t) runs proc for t clock ticks.
 void setPageTable(PageTable pt)
          proc.setPageTable(pt) sets the page table for proc to pt.
 java.lang.String toString()
          proc.toString() returns the class name and process identifier of proc as a string.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PCB

public PCB(int tid,
           Image im)
new PCB(tid, im) returns a new PCB with process identifier tid and executable image im.

Method Detail

getPID

public int getPID()
proc.getPID() returns the process identifier for proc.


getImage

public Image getImage()
proc.getImage() returns the executable image for proc.


getTimeLeft

public int getTimeLeft()
proc.getTimeLeft() returns the CPU time remaining until proc has completed execution.


isTerminated

public boolean isTerminated()
proc.isTerminated() returns true if proc has terminated execution.


getPageTable

public PageTable getPageTable()
proc.getPageTable() returns the page table for proc.


setPageTable

public void setPageTable(PageTable pt)
proc.setPageTable(pt) sets the page table for proc to pt.


getDescription

public java.lang.String getDescription()
proc.getDescription() returns a description of proc.


toString

public java.lang.String toString()
proc.toString() returns the class name and process identifier of proc as a string.

Overrides:
toString in class java.lang.Object

run

public void run(int t)
proc.run(t) runs proc for t clock ticks.