Sunday, December 06, 2009 8:16 PM,



A student writes, and although he is motivated by getting prog5 working, he 
asks some questions that could be helpful re: studying for the final.

I will delete his questions that deal specifically with prog5, but forward you 
the questions/answers that are broader.
	
	 ...


	 However, I added the delays to make the program more readable in 
	 execution, then all of a sudden the interrupts wouldn't interrupt the 
	 trap instructions.  Is it that I'm not typing the input fast enough?



No, the delay can not do that.  And, no, if the program is working as you 
claim, you can let the UT checkerboard go on for as long as you wish (hours, 
for example) before you type a character and the interrupt will still occur.



	 Or, is it that the priority levels are getting changed without me, the 
	 user, knowing?



No, the priority levels are not being changed.



	 Lastly, how does the processor decide what priority level the 
	 interrupts are,



Each interrupting device (in this case, the keyboard) is assigned a priority 
level.  On some computers it is fixed by the electronic circuits.  In other 
computers, it can be changed by the operating system that has the privilege of 
writing to a 3-bit register that contains that information.  In either case, 
it is not usually available to users to meddle with.



	 and how do we manually change the priority levels?  



You don't.



	 Does JSR change privilege level? And if so, then how would we 
	 maunually alter the privilege level?



No, a user program can not increase its privilege by using a JSR instruction.  
Think about it.  You are logged into a computer that several people are using.  
You want to play a trick and just simply stop the computer and watch everyone 
freak out.  But you do not have the privilege to do that.  So, you write a 
subroutine that stops the computer, and just executes JSR to that subroutine.  
If using JSR would give you the necessary privilege, then the notion of 
privilege becomes meaningless.



	 Thanks in advance!
	 <<name withheld to protect the student still struggling with prog 5>>



Good luck on the final exam.
Yale Patt