On 29 Oct 2001, at 19:37, John R Pierce wrote: > I've had similar problems with a few other multimedia sorts of > junkware. Near as I can tell, some of these things put their video or > animation thread at Idle_Priority+1 or something, and it gets eaten > alive by Prime95.
Isn't it the old problem - no matter what priority a process is running at, unless it's interrupt driven it won't preempt a process running at a lower priority. The problem here is that the multimedia stuff wants to do a very little work but very often. It gets slowed down because Prime95 hangs on to the processor until its timeslice expires - it almost never has to wait for some external event. Ideally the multimedia stuff would be driven by timer interrupt. But for some reason (maybe something to do with there being a limited number of timer channels, and those having rather poor resolution) this approach seems to be quite rare on PC systems. One way to improve the performance in these circumstances is to reduce the minimum timeslice for low-priority processes. This will cause the task scheduler to be "busier" and therefore reduce the overall performance to some extent, but multimedia type applications will coexist much more happily with compute-intensive tasks if this is done. Sorry, I have no idea how to do this, or even whether it is possible, in any of the versions of Windows. The linux 2.4 kernel does this almost automatically, by having a much smaller minimum timeslice for idle-priority processes than for processes running above idle priority. (The timeslice is reduced again for processes running at unusually high priority, so that they can't hog the whole system quite so easily.) I believe the timeslice parameters are tunable (without having to recompile the kernel), but I have no personal experience of actually doing this. Another other way to "fix" the problem is to have the compute- intensive process voluntarily relinquish its timeslice at intervals which are much shorter than the minimum timeslice (which is typically of the order of 200 ms). This reduces the efficiency of the compute-intensive task to some extent but does make it coexist better. I suppose it would be possible to build this into Prime95; if this is done I would like options to be "multimedia friendly" or "optimally efficient" - probably the best way to implement would be to have the code contain the relevant system calls but to NOOP over them if efficiency is demanded. The remaining problem with this approach is that how often you would want to make these system calls would depend very heavily on the processor speed. Relinquishing the timeslice very frequently would enable even slow systems to run multimedia pretty seamlessly, but at a heavy cost on all systems. Placing the system calls in a position where they would be effective but not too costly, across a large range of processor speeds and a large range of FFT run lengths, would not be a trivial task. Regards Brian Beesley _________________________________________________________________________ Unsubscribe & list info -- http://www.scruz.net/~luke/signup.htm Mersenne Prime FAQ -- http://www.tasam.com/~lrwiman/FAQ-mers
