Path: utzoo!attcan!uunet!wuarchive!psuvax1!swatsun!jackiw From: jackiw@cs.swarthmore.edu (Nick Jackiw) Newsgroups: comp.sys.mac.programmer Subject: Re: Two suggestions for THINK C Message-ID: <39FN4Y@cs.swarthmore.edu> Date: 2 Aug 90 13:41:16 GMT References: <1990Aug1.220231.18581@ucselx.sdsu.edu> <1990Aug2.065801.5767@d.cs.okstate.edu> Reply-To: jackiw@cs.swarthmore.edu (Nick Jackiw) Organization: Visual Geometry Project, Swarthmore College, PA Lines: 38 minich@d.cs.okstate.edu (Robert Minich) writes: > I agree an OS should deal with CPU scheduling, but I don't think that > it would be prohibitively difficult to support background compilation. > Judging how often to yield CPU time might entail a little bit of work, > but it seems obvious to me that they are already checking for events, > since they catch cmd-'.' to interrupt compiling. > I s'pose the main difficulty would be ensuring the foreground process > regular CPU bursts. However, I think it would be relatively simple to > add some code around the are that provides status updates ("xxx lines") > that looks at the current number of ticks and calls WNE() after a > reasonable amount have gone by. My project (THINK Pascal 3.0, but the argument's equivalent) takes a good 10 minutes to compile on an SE/30, locking up my machine entirely. Thus I frequently have time to ruminate about these issues. In that apple's not going to come up with user-based OS task scheduling soon, I frequently dream about my more sophisticated and time-consuming utilities (e. g. my compilers) allowing me at least to schedule their individual behavior. Some sort of meter in the Compile Options dialog could represent a percent of CPU time I desire to allocate to the compilation. It would default to 100--never switch out, never call WNE. (This is what it does now, I assume--it checks for cmd-. by consulting the keymap, not the event queue.) However, if I set it to 75%, I would expect my compile to take 13 minutes, but I'd have enough spare cycles to watch me tap the space bar in netnews. Alternately, I could allot it only 20%, have it take an hour, and work on my documentation with a fairly-good response time in the word processor. This sort of self-scheduling can never be better than approximative, in that you can't force tasks to return to you at a given time, but 5 minutes worth of scattered timeouts is still far more desirable than the 10 minute total lockup now confronting me every time I change a trans-project header. -- ------------------------ Nick Jackiw jackiw@cs.swarthmore.edu "We are what we think, Visual Geometry Project jackiw@swarthmr.bitnet having become what we