Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!brutus.cs.uiuc.edu!ux1.cso.uiuc.edu!ux1.cso.uiuc.edu!m.cs.uiuc.edu!gillies From: gillies@m.cs.uiuc.edu Newsgroups: comp.arch Subject: Re: Re^2: Macintosh OS Message-ID: <3300135@m.cs.uiuc.edu> Date: 11 Jun 90 06:23:00 GMT References: <355@three.MV.COM> Lines: 32 Nf-ID: #R:three.MV.COM:355:m.cs.uiuc.edu:3300135:000:1733 Nf-From: m.cs.uiuc.edu!gillies Jun 11 01:23:00 1990 > What an amazingly half-baked idea! Oh, sorry. . .I just insulted the bakers > of the world. What you're talking about is placing an absolutely impossible > task in front of the compiler writers (who certainly have enough to worry > about already) in hopes of making life just a *tiny* bit easier for OS and > application developers. There is NO WAY that the compiler can have any but > the foggiest idea concerning which points are "appropriate" for a possible > context switch. The application designer will certainly have a much better > idea, or the OS can allow the user to choose, but the compiler is absolutely > the worst place to attempt a solution. This makes me chuckle, since people have been doing it for 25 years without knowing "it's impossible" or "half baked". The threaded TUTOR interpreter that runs on PLATO (CDC Cybers) inserts checks for context switches ("autobreaks") before every backwards branch. It works quite well, too, supporting hundreds of users with high efficiency, and load balancing the system so nobody claims more than 10,000 instructions per second. As for those who complain about the slowdown of tight loops --- well, tight loops can be unrolled, or countdown timers can be used to reduce the frequency of checking to give up the processor. I think in 5 or 10 years when everyone wants their desktop workstation to outperform a Cray 5, then this strategy may come back into vogue. Like everything else, it costs some speed to build a CPU that can handle interrupts, and Seymour Cray is well aware of this. Don Gillies, Dept. of Computer Science, University of Illinois 1304 W. Springfield, Urbana, Ill 61801 ARPA: gillies@cs.uiuc.edu UUCP: {uunet,harvard}!uiucdcs!gillies