Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!husc6!cmcl2!nrl-cmf!ames!ucbcad!ucbvax!amdcad!rpw3 From: rpw3@amdcad.AMD.COM (rpw3) Newsgroups: comp.arch Subject: Re: register windows Message-ID: <19019@amdcad.AMD.COM> Date: Fri, 6-Nov-87 23:20:36 EST Article-I.D.: amdcad.19019 Posted: Fri Nov 6 23:20:36 1987 Date-Received: Mon, 9-Nov-87 04:33:12 EST References: <201@PT.CS.CMU.EDU> <28200061@ccvaxa> Reply-To: rpw3@amdcad.UUCP () Organization: [Consultant] San Mateo, CA Lines: 44 In article <28200061@ccvaxa> aglew@ccvaxa.UUCP writes: +--------------- | ..> Procedure call vs. interrupt frequency. | Something else to point out: globally optimizing compilers can do inline | expansion of much code, reducing procedure call overhead and frequency. | This cannot be done to interrupts. +--------------- Just another note about the Am29000... The entire register set does *NOT* have to be saved on either a system call or an interrupt, only on a "forced" context switch. For a system call, not even the temps have to be saved; a system call is a "subroutine", and temps are assumed destroyed across subroutines. A system call also uses the same register window (set of busy/free registers) as the user (yup!). Thus, if the current register window happens to have enough registers free at the end, no registers need be saved/restored to complete the system call. Interrupts (at least those which call C code, and aren't just "soft-DMA" assembly-language heads) *do* have to save the "global" temps, but still need only save/restore the "local" stack-cache registers actually used. Only in the case where an interrupt forces a context switch (say, at a runtime quantum expiration) does the entire set have to be saved/restored. (Context switches due to blocking-I/O had to have a system call first, so a lot of the registers were free already.) A related point: Since a system calls are implemented with a synchronous "trap"-type instruction, virtually none of the processor state has to be saved, either, only the user PC (29000's "PC1"). Contrast this with CISC machines for which any mode change saves beaucoup bits... Do a "vmstat" on your VAX, and you'll see that making system calls and interrupts faster than context switches is a "good thing". Rob Warnock Systems Architecture Consultant UUCP: {amdcad,fortune,sun,attmail}!redwood!rpw3 ATTmail: !rpw3 DDD: (415)572-2607 USPS: 627 26th Ave, San Mateo, CA 94403