From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fa751,9586efba84221cf8 X-Google-Attributes: gidfa751,public X-Google-Thread: 115aec,9586efba84221cf8 X-Google-Attributes: gid115aec,public X-Google-Thread: f8403,9586efba84221cf8 X-Google-Attributes: gidf8403,public X-Google-Thread: 102b75,9586efba84221cf8 X-Google-Attributes: gid102b75,public X-Google-Thread: 1164f8,9586efba84221cf8 X-Google-Attributes: gid1164f8,public X-Google-Thread: feb3e,9586efba84221cf8 X-Google-Attributes: gidfeb3e,public X-Google-Thread: 10cebf,9586efba84221cf8 X-Google-Attributes: gid10cebf,public X-Google-Thread: 110292,9586efba84221cf8 X-Google-Attributes: gid110292,public X-Google-ArrivalTime: 1995-02-22 14:23:00 PST Newsgroups: comp.sys.powerpc,comp.realtime,comp.sys.intel,comp.arch,comp.sys.dec,comp.sys.dec.micro,comp.sys.m68k,comp.sys.sgi.hardware,comp.sys.sgi.misc,comp.sys.sun.hardware,comp.sys.sun.misc,comp.sys.hp.hardware,comp.sys.hp.hpux Path: nntp.gmd.de!Germany.EU.net!howland.reston.ans.net!news.sprintlink.net!peernews.demon.co.uk!demon!ken From: ken@kgcc.demon.co.uk (Ken Green) Subject: Re: seeking context switch times/TPC cache-miss figures Message-ID: Date: Wed, 22 Feb 1995 09:16:54 GMT Reply-To: Ken.Green@kgcc.demon.co.uk References: <3ie6q4$fsf@geraldo.cc.utexas.edu> Organization: Ken Green Computer Consultancy X-Newsreader: TIN [version 1.2 PL2] Followup-To: comp.sys.powerpc,comp.realtime,comp.sys.intel,comp.arch,comp.sys.dec,comp.sys.dec.micro,comp.sys.m68k,comp.sys.sgi.hardware,comp.sys.sgi.misc,comp.sys.sun.hardware,comp.sys.sun.misc,comp.sys.hp.hardware,comp.sys.hp.hpux Xref: nntp.gmd.de comp.sys.powerpc:40194 comp.realtime:6551 comp.sys.intel:35403 comp.arch:27989 comp.sys.dec:21746 comp.sys.dec.micro:2764 comp.sys.m68k:5013 comp.sys.sgi.hardware:10534 comp.sys.sgi.misc:16646 comp.sys.sun.hardware:26873 comp.sys.sun.misc:19668 comp.sys.hp.hardware:6937 comp.sys.hp.hpux:20483 Anthony Petro (apetro@pegasus.ece.utexas.edu) wrote: > for my research, i am seeking actual numerical data for context-switch > times for a variety of architectures and OSes. i am also seeking data > on cache-miss percentages for transaction processing benchmarks > (e.g. TPC). > specifically, i am interested in the user-to-kernel context-switch > times, including all overhead incurred in hardware and software > once a syscall, trap, or interrupt occurs until the kernel actually > begins servicing the syscall/trap/interrupt. with respect to TPC > cache-miss ratios, i'm particularly interested in cold-cache effects > (compulsory misses) after a context switch. > > i'm also interested in user-to-user context-switch times. This is a table that was published here last year Date: Wed, 9 Feb 94 14:56:13 PST From: Larry.McVoy@eng.sun.com (Larry McVoy) To: dck@cse.nd.edu 68 99 Mhz HP-735 HP-UX 9.01 80 33 MHz 486DX QNX 4.2 87 160 Mhz DEC 4000/610 DEC OSF/1 v1.3 98 40 MHz R3000 DEC 5000/240 Ultrix 4.2 98 66 MHz 486DX2 Linux 0.99.10 102 62 MHz IBM-RS6000/580 AIX 3.2 106 66 Mhz snake HP-UX 9.x 128 40 Mhz SS10 SunOS 4.1.3 154 25 MHz R3000 DEC 5000/200 158 50 MHz R4000 SGI 188 48 Mhz + 1Me$ SS10 SunOS 5.2 198 33 MHz Sparc 4/470 SunOS 4.1.1 210 33 Mhz 486 386BSD 0.1 212 50 Mhz RIOS AIX 3.2 225 40Mhz SS10 SunOS 5.2 230 40Mhz SS2 SunOS 4.1.2 281 20 MHz R3000 DEC 5000/120 345 33 MHz R3000/3010 SGI Irix 4.0.5 380 33 MHz 486 NetBSD 454 40Mhz SS2 SunOS 5.2 628 50Mhz Sparc classic SunOS 5.2 %Title Context switch times in microseconds (raw numbers) The test program used to generate these numbers used a pair of processes signaling each other, to get the context switches. Similar to #include #include int other; void sig(sign) int sign; { kill(other,16); } main() { int p=getpid(); int me, q, count = 0; struct timeval t1,t2; struct timezone junk; struct sigaction act,oact; act.sa_handler=sig; sigemptyset( & ( act.sa_mask ) ); act.sa_flags=0; sigaction(16,&act,&oact); switch( q=fork() ) { case 0: /*child*/ other=p; break; default: other=q; kill(other,16); } gettimeofday(&t1,&junk); me = getpid(); while(1) { pause(); count++; if (count == 2000) { gettimeofday(&t2,&junk); printf ("Me: %5d %7d signals in %6.3f seconds \n", me, count, ( ( (double)t2.tv_usec + 1000000*(double)t2.tv_sec) - ( (double)t1.tv_usec + 1000000*(double)t1.tv_sec) )/ 1000000) ; count=0; gettimeofday(&t1,&junk); } } } The test is of course not perfect as the loop includes 2 system calls, but I hope you find it useful anyway. > it would be of further use if the context-switch time were broken into > actual hardware save/restore time, OS housekeeping/scheduling time, > and/or cold-cache effects (or any combination) but i can work with a > single lumped context-switch time. > please state the conditions under which the context switch was timed > and/or transaction processing cache miss ratio observed; > architecture and OS at a minimum. if the time includes > syscall/service routine execution time, please state that and whether > it's an avg/best case/worst case. i'm looking more for a general > picture than for great precision; hence even if your example is > anecdotal i'd like to hear it. > this information is being used to motivate research for new > architectures optimized for fast context-switching for TP-like > workloads. if there is interest, i will summarize any data i receive. > many thanks in advance. > tony > -- > anthony m petro > u. of texas - austin > ee grad student, > on good days... -- __________________email Ken.Green@kgcc.demon.co.uk _____________________ Ken Green Computer Consultancy 22 Matthews Chase, Binfield, Berkshire, RG12 5UR. U.K.