Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!bloom-beacon!mit-eddie!uw-beaver!uw-june!robertb From: robertb@june.cs.washington.edu (Robert Bedichek) Newsgroups: comp.arch Subject: Re: RISC & context switches Message-ID: <7239@june.cs.washington.edu> Date: 10 Feb 89 19:02:48 GMT References: <784@atanasoff.cs.iastate.edu> Reply-To: robertb@uw-june.UUCP (Robert Bedichek) Organization: U of Washington, Computer Science, Seattle Lines: 51 In article <784@atanasoff.cs.iastate.edu> hascall@atanasoff.cs.iastate.edu (John Hascall) writes: > > > I seem to recall there was (is?) a TI processor which had all of > its registers in memory except 1 register which pointed to > the other registers, so a context switch was just save/restore > that one register. Could a similar concept be implemented > with all the registers in the chip? I believe that you are thinking of the TI9900, one of the first 16-bit microprocessors. It was very slow, I think at least partly because it kept its registers in memory. > > > > It seems to me that such a scheme would take little extra hardware > (other than the extra registers). I just pulled the number 16 out > of the air, any power of 2 would be as easily implemented--perhaps > enough that on a workstation most or all of the processes could > have a "real-time" slot. Yes, but the extra hardware for the registers takes a lot of silicon area! Some Xerox machines had such a scheme. They had something like 8 register banks and could do a context switch in a few cycles. A large semiconductor company copied this idea in an IO processor that I think will never see the light of day. >A hair-brained scheme or what? Well, I don't think its hair-brained, it makes sense if you want very fast context switch time. But having lots of register banks is very expensive in silicon area and in register access time. Register files tend to be multiported, so each bit takes a lot of area. Increasing the size of the register file will often lead to an increased cycle time or an increase in the number of cycles to do a basic operation. To pick an example: The Motorola 88000 has 31 general registers. If you added your register bank idea to this machine you would get very little benefit when running UNIX. There are so many other things that have to be done on a context switch that the time to save the 31 general registers is insignificant. Btw, I think the designers of the 88k made *excellent* trade-offs in its design. After spending a year working on system software for the machine, there is almost nothing that I would change. Rob Bedichek