Wed, 9th Dec 2015, 03:21 Re: Privilege

A student writes:

> Hello professor,
> I am really confused about privilege. I went to the review yesterday and
> Stephen said that the only privilege instruction is RTI. So what does it
> mean to be a privilege instruction?
> Thank you,
> <<name withheld to protect the student who is confused about privilege>>

I need to understand better where your confusion comes from?  Were you in class
when I explained it?  Did you go to the TA discussion session when the TA
further explained it.  Did you understand my analogy associated with my friend
who worked in the basement and was on the 55th floor waiting for the elevator
and wet his pants because he did not have the privilege of being able to use
the Men's Room on the 55th floor?  Finally, have you asked a TA during office

Every computer ISA I know of has at least two levels of privilege: kernel
(also known as supervisor or privilege) and user (also known as no_privilege).
PSR[15]=0 means the program is running with kernel privilege.  PSR[15]=1 means
the program is running with user (i.e., no) privilege.  In all computer systems
I know of, there are certain things that can only be done if the program is
executing with kernel privilege.  The only instruction in the LC-3 ISA that
requires kernel privilege to execute is RTI.  If the computer tries to execute
RTI and does not have kernel privilege, the computer will terminate the program
right there.  Certain memory locations require privilege to load to or store
from.  On the LC-3, those are locations x0000 to x2FFF.  On most machines,
accessing I/O registers require kernel privilge.

Good luck on the final exam.

Yale Patt