Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!purdue!mentor.cc.purdue.edu!l.cc.purdue.edu!cik From: cik@l.cc.purdue.edu (Herman Rubin) Newsgroups: comp.arch Subject: Re: Bandwidth Wasters Hall of Fame for comp.arch Summary: Context switch includes the stack and storage involved. Keywords: Stack, mutlitasking, registers, etc., etc. Message-ID: <1607@l.cc.purdue.edu> Date: 24 Sep 89 18:45:13 GMT References: <13744@well.UUCP> <4186@bd.sei.cmu.edu> <10732@eerie.acsu.Buffalo.EDU> <11539@burdvax.PRC.Unisys.COM> Distribution: na Organization: Purdue University Statistics Department Lines: 24 In article <11539@burdvax.PRC.Unisys.COM>, barry@PRC.Unisys.COM (Barry Traylor) writes: ................................ > Stack machines OPTIMIZE locality of reference. By doing such, a processor > does not need to have massive quantities of registers available. On a > context switch, or better yet, a process switch (which on most machines > involves 2 context switches), how long does it take to store and restore > all of those registers? ............................... How long does it take to get all those items on the stack, and to read them off the stack? The CDC6x00 and related machines had no programmer context switch; it was necessary for each part of the program to make sure that the contents of its important registers were not clobbered by any calls. This involved a great deal of loading and storing, far slower than context switch hardware would have been if it were available. Of course, it there was nothing to save and later restore, this cost would not be incurred, but it was frequently quite high. -- Herman Rubin, Dept. of Statistics, Purdue Univ., West Lafayette IN47907 Phone: (317)494-6054 hrubin@l.cc.purdue.edu (Internet, bitnet, UUCP)