🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.arch
Article #21885

Context switching on RISC chips

#21885
From: Ed Federmeyer
Date: Sat, 30 Dec 1989 21:07
28 lines
2208 bytes
One of the things that seems to characterize RISC chips is the relatively
large number of registers.  This makes me wonder what happens during a
context switch.  After all, moving 256 (or more) registers to memory, and
then another 256 (or more!) back in for each context switch seems like an
awfull lot of overhead.  I can think of a few ways around this:

1) Do nothing special... Suffer
2) Have each register "tagged" like a cache, so only the "dirty" registers
   need to be moved out.  You'd still have to load in all the old ones.
3) Have a few register "sets".  Ie, a context switch really moves a pointer
   to a bank of registers (of which there are several on-chip).
4) Like 3, but only have 2 sets.  While context 2 is processing, drain out
   context 1's set so it's ready by the next switch.  Since a RISC chip
   seems to execute 1 instruction in 1 cycle, I can't see that there is
   alot of extra bus cycles. (Unlike in a CISC, where you might have hundreds
   of clock cycles free while the processor executes an instruction in which
   the bus is not being used)  Unless of course you have a second bus
   going to memory dedicated to just shuttling registers in and out.

Are any of these sorts of techniqes being used in real RISC chips?  Or
am I just over estimating the overhead of RISC context switching?  If I get
some Email responses to this, I'll post a summary.
-- 
+-------------------------------------+--------------------------------------+
|  Ed Federmeyer                      |    Internet:  ed@iitMax.iit.edu      |
|      "Unauthorized access is        |    Bitnet:    sysed@iitVax           |
|         strictly unauthorized."     |    Office:    (312) 567-5981         |
+-------------------------------------+--------------------------------------+
Technical Details
Message-ID: <3167@iitmax.IIT.EDU>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!cs.utexas.edu!asuvax!ncar!tank!iitmax!ed

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!cs.utexas.edu!asuvax!ncar!tank!iitmax!ed
From: ed@iitmax.IIT.EDU (Ed Federmeyer)
Newsgroups: comp.arch
Subject: Context switching on RISC chips
Message-ID: <3167@iitmax.IIT.EDU>
Date: 30 Dec 89 21:07:08 GMT
Reply-To: ed@iitmax.iit.edu (Ed Federmeyer)
Organization: Illinois Institute of Technology
Lines: 28