Path: utzoo!attcan!uunet!lll-winken!lll-tis!ames!umd5!purdue!i.cc.purdue.edu!j.cc.purdue.edu!pur-ee!iuvax!bsu-cs!neubauer From: neubauer@bsu-cs.UUCP (Paul Neubauer) Newsgroups: comp.arch Subject: Re: Is the Intel memory model safe from NO-ONE ?!? Message-ID: <3039@bsu-cs.UUCP> Date: 14 May 88 03:31:10 GMT References: <353@cf-cm.UUCP> <3095@edm.UUCP> <20618@think.UUCP> <1988May12.162207.16764@utzoo.uucp> <8722@ames.arc.nasa.gov> Reply-To: neubauer@bsu-cs.UUCP (Paul Neubauer) Organization: CS Dept, Ball St U, Muncie, Indiana Lines: 35 In article <8722@ames.arc.nasa.gov> Hugh LaMaster writes: >In article <1988May12.162207.16764@utzoo.uucp> Henry Spencer writes: >>Probably because practically every machine in existence routes *all* >>traps and interrupts to the kernel, which can pass them on to the user >>if it pleases. I know of no machine, offhand, whose hardware has any >>notion of a "user handler". > >Well, here's your first: the Cyber 205 architecture has a "data flag >branch register" which is under user control. Part of the processor >context is this register which tells what to do with various >conditions as well as what conditions exist. and in another article John R. Levine writes: >Funny you should mention that. On the 286 and 386, traps can go to >"conformant" segments that run in the protection domain of the caller. You A third machine (family) (not very exotic, in fact, downright mundane) that permits user-mode, user-written traps is the IBM 370 series. The Program Status (double) Word is a 64-bit double-word that contains the address of the next instruction, a condition code, and some other information on the status of the process. There are also 5 8-byte locations in low (virtual) memory where a programmer can put predefined PSW's for 5 classes of interrupts, so that when an interrupt makes that PSW current, the process will be placed into the appropriate error-handler for that interrupt class. For any given interrupt, the interrupt handler for that class can test an interruption code to see if it is an interrupt that it wants to handle, e.g., a handler for the class of "program" interrupts could be arranged to recover relatively gracefully from a divide-by-zero exception, but just allow the program to abend (crash) on an addressing exception for out-of-limits addresses, or vice-versa. This can all be done in user-mode with no special privileges. -- Paul Neubauer neubauer@bsu-cs.UUCP !{iuvax,pur-ee,uunet}!bsu-cs!neubauer