|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnachos.security.Privilege
public abstract class Privilege
A capability that allows privileged access to the Nachos machine.
Some privileged operations are guarded by the Nachos security manager:
Some privileged operations require a capability:
The Nachos kernel should never be able to directly perform any of these privileged operations. If you have discovered a loophole somewhere, notify someone.
Nested Class Summary | |
---|---|
static interface |
Privilege.InterruptPrivilege
An interface that provides access to some private Interrupt methods. |
static interface |
Privilege.MachinePrivilege
An interface that provides access to some private Machine methods. |
static interface |
Privilege.ProcessorPrivilege
An interface that provides access to some private Processor methods. |
static interface |
Privilege.TCBPrivilege
An interface that provides access to some private TCB methods. |
Field Summary | |
---|---|
Privilege.InterruptPrivilege |
interrupt
Provides access to some private Interrupt methods. |
Privilege.MachinePrivilege |
machine
Provides access to some private Machine methods. |
Privilege.ProcessorPrivilege |
processor
Provides access to some private Processor methods. |
Stats |
stats
Nachos runtime statistics. |
Privilege.TCBPrivilege |
tcb
Provides access to some private TCB methods. |
Constructor Summary | |
---|---|
Privilege()
Allocate a new Privilege object. |
Method Summary | |
---|---|
void |
addExitNotificationHandler(Runnable handler)
Add an exit() notification handler. |
abstract Object |
doPrivileged(PrivilegedAction action)
Perform the specified PrivilegedAction with privilege. |
abstract Object |
doPrivileged(PrivilegedExceptionAction action)
Perform the specified PrivilegedExceptionAction with privilege. |
abstract void |
doPrivileged(Runnable action)
Perform the specified action with privilege. |
abstract void |
exit(int exitStatus)
Exit Nachos with the specified status. |
protected void |
invokeExitNotificationHandlers()
Invoke each exit() notification handler added by addExitNotificationHandler(). |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public Stats stats
public Privilege.MachinePrivilege machine
public Privilege.InterruptPrivilege interrupt
public Privilege.ProcessorPrivilege processor
public Privilege.TCBPrivilege tcb
Constructor Detail |
---|
public Privilege()
Method Detail |
---|
public abstract void doPrivileged(Runnable action)
action
- the action to perform.public abstract Object doPrivileged(PrivilegedAction action)
action
- the action to perform.
public abstract Object doPrivileged(PrivilegedExceptionAction action) throws PrivilegedActionException
action
- the action to perform.
PrivilegedActionException
public abstract void exit(int exitStatus)
exitStatus
- the exit status of the Nachos process.public void addExitNotificationHandler(Runnable handler)
handler
- the notification handler.protected void invokeExitNotificationHandlers()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |