abhatia@ecs.umass.edu (08/03/90)
Since I didn't get any response to my question, I am posting it again as there was some problem with the news-server here and I think I may not have received the replies, if any, to the net. Would the people who responded be kind enough to send me their answer by email? Thanks a lot. -------------------------------------------------------------------- Excuse me if this is a stupid question as I am a beginner with UNIX. I'm taking a course in which we're going thru "a specially edited selection of the UNIX Operating System source code, such as might be used on a typical PDP11/40 computer installation." While going thru the assembler _trap routine, I see that, just before the specialised interrupt handling routine (to which r0 points), the PS is changed to reflect the previous processor mode as "user" if it was "kernel". I can't understand why this is done. Could it be because the interrupt handling routine might reassign priorities and call swtch(), which needs the previous processor mode to be "user" for it to swap out the interrupted process and swap in another {though I don't see how swtch() could need that.} Thanks, Ajoy K. Bhatia Internet: abhatia@omega.ecs.umass.edu Bitnet : abhatia@umaecs