On 28 Nov 00, at 10:26, Martijn wrote:
> I do not have a problem with prime95 / mprime taking any amount of memory,
> as long as thrashing is adequately dealt with. I am currently trying to
> get assignments as small as possible for memory reasons, with (from
> prime95 point of view) enough memory present 95% of the day, the other 5%
> being at "random" times. It does not harm if prime95 takes 100 MB but it
> would be nice if prime95 / mprime sleeps some time if a higher priority
> job needs the memory. For instance if prime memory gets swapped out its
> process could sleep for 5-10 seconds.
Nice idea - is this facility in any OS kernel? I'm pretty sure it
isn't in windoze ... the point is that the application is unaware
that it is running up page faults; the kernel doesn't bother to
inform it. There could be a significant performance penalty involved
in continuously reading the kernel memory usage table in order to
determine whether memory stress is evident, as well as complications
due to memory usage being apparently high due to the presence of
large amounts of disposable I/O buffers, or the existence of pages
written to the page file but not required due to the processes which
own them sleeping.
The "usual" task switching mechanism is that, if a job gets CPU
cycles, it gets access to memory too. The variant of this of which
I'm aware was VAX VMS, where a process which couldn't get access to
the CPU for an extended period (because other higher-priority
processes were using all available cycles) and there was pressure on
memory, the whole process would be swapped out (written to the
page/swap file). When this happened, the process would not be
eligible to get reloaded for some time - I seem to remember that 15
secs was the default.
The problem with VMS was that, once swapping started, pressure on the
I/O channels usually caused a more or less total loss of system
performance. (It was not accidental that the VMS manual's primary
reccomendation for _any_ system tuning problem was "add more
memory"!)
One of the nicer things about the windoze implementation of mprime is
the facility to manually stop & restart the program from the main
menu. It gives up its main workspace whilst suspended in this way,
though obviously retaining the relatively small resources belonging
to its process header block, console window, task bar icon etc.
Perhaps this could be exported to mprime by provision of a version to
run as an X client? So long as I don't _have_ to run X in order to
run mprime!!!
Regards
Brian Beesley
_________________________________________________________________________
Unsubscribe & list info -- http://www.scruz.net/~luke/signup.htm
Mersenne Prime FAQ -- http://www.tasam.com/~lrwiman/FAQ-mers