Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!rutgers!mcnc!thorin!clocs!davis From: davis@clocs.cs.unc.edu (Mark Davis) Newsgroups: comp.arch Subject: Context Switch Time, A worst Case Summary: Not Significant for Unix Workstations Keywords: Context switch, register files, saving world Message-ID: <4908@thorin.cs.unc.edu> Date: 28 Oct 88 00:33:48 GMT Sender: news@thorin.cs.unc.edu Lines: 41 I would like to add a little data to the discussion on the context switching time of large register files. Since my dissertation is on architectures to reducing context switching time, I have a definate bias. Unfortunately for me, new architectures to reduce context switch time will not save the world of Unix workstations. The worst observed impact of context switch time is our timeshared VAX 11/780. During the day it has about: 70 users, 250 processes, and a 7 load average (~ average number of processes ready to run at any instant). In this condition, it switches context about 100 times per second (10 times faster that required by quantum). We have measured context switch time at about 1 ms (about the same as reported in literature). In this case, 10% of the time is spent switching context. (This is considerably higher that some of the back of the envelope estimates recently appearing in this newsgroup, but nothing to write home about.) A Sun 4/280 running SunOS 3.5 takes about .5 msec to switch context. We find file servers context switch about 100 times/sec => %5. These values vary greatly, so I would not hang my hat on this % (You mileage ...). For the Vax (running Mt Xinu BSD 4.3) and for the Sun 4 (a register window machine) running SunOS, > 95% of the context-switch time is spent on other tasks (mostly UNIX scheduling algorithms). (Sun MMU's get nasty if you exceed the magic number of 8 (Sun 3) or 16 (Sun 4), but that's a different story.) Note that in this business, the 10% performance improvement (represented by reducing context switch time to 0 on our poor Vax) takes about as long as it takes me to write this posting. (There are applications where register save/restore time make a difference. Otherwise, I would be looking for another dissertation topic. Unix workstations is not the place, though.) (The data quoted above was found by research partially supported by some ONR grant or the other.) Thanks - Mark (davis@cs.unc.edu or decvax!mcnc!davis)