Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!sdd.hp.com!zaphod.mps.ohio-state.edu!sol.ctr.columbia.edu!bronze!tagreen From: tagreen@bronze.ucs.indiana.edu (Todd A. Green) Newsgroups: comp.sys.mac.system Subject: Re: Preemption good, time-slicing bad (was Re: All about sys 7.0 ) Message-ID: <1991Apr2.154310.23228@bronze.ucs.indiana.edu> Date: 2 Apr 91 15:43:10 GMT References: <10227@hub.ucsb.edu> <1991Apr1.232302.6882@bronze.ucs.indiana.edu> <1991Apr2.144318.4117@ux1.cso.uiuc.edu> Organization: Indiana University, Bloomington Lines: 45 In article <1991Apr2.144318.4117@ux1.cso.uiuc.edu> dorner@pequod.cso.uiuc.edu (Steve Dorner) writes: >In article <1991Apr1.232302.6882@bronze.ucs.indiana.edu> tagreen@bronze.ucs.indiana.edu (Todd A. Green) writes: >>Thus if I check for context switching (via app4 event right?) and see >>that I've been switched out to the background I can be a "nice" >>programmer and change my sleep parameter to give up say 10 ticks > >What if the service you're performing is vital to the user, and it wants you >to have as much cpu as you need, background or not? What if NOTHING at all >is going on in the foreground, except the user twiddling its thumbs, waiting >for you to finish, (and staring at inane news articles :-))? Why make it >wait longer than it must? Actually I've been meaning to learn how the Event queue is "stored". I'm not skilled enough (yet) to take a peak at it. Ideally (at least for now till I come up with a better solution or hear a better one), I'd like to look at the event queue record and see how many null events are stored, and base the amount of time my background app would use on this; _if_ this is how it works. Thus if I could tell that the other apps were just processing null events I could start crunching away, but if I noticed that the forground app was processing keydown's I'd slow it down. Hmm...time to hit the ole IM again. Anyone who would care to share their infinite wisdom on the workings of the event queue is welcome :) (via email if people are truly sick of this thread) >A priority system of some sort would be a help. How much difference it >would make to most users is very doubtful; most users don't do much multi- >tasking anyway, or so I think. I could not live without a multitasking machine. I only wish I had more hands (perhaps a brain would help too ;) ). Actually the virtual reality ports on the Mac III should help. >(On to Moscow!) >-- >Steve Dorner, U of Illinois Computing Services Office >Internet: s-dorner@uiuc.edu UUCP: uunet!uiucuxc!uiuc.edu!s-dorner (On to Rio!!!) Todd ----- Internet: tagreen@bronze.ucs.indiana.edu NeXTMail: tagreen@lothario.ucs.indiana.edu