Microsoft Word & (SCO) Unix 3.2
kdg at nirvo.uucp
Mon Aug 28 12:36:24 AEST 1989
In article <32271 at ism780c.isc.com> darryl at ism780c.UUCP (Darryl Richman) writes:
>In article <5864 at ficc.uu.net> peter at ficc.uu.net (Peter da Silva) writes:
>"This behaviour indeed speeds up most UNIX programs. However, programs written
>"using Intel's UDI interface, such as their PLM286 compiler and associated
>"tools, end up requesting 64K for all memory requests. This tends to lead to
>"processes that are very large, creates inordinate amounts of thrashing, and
>"even runs out of virtual memory space if the program makes frequent requests
>"for small amounts of memory.
>I'm surprised that you see a significant amount of thrashing, since, if
>you don't use the memory, it stays paged out. And pages that aren't
>touched don't get allocated real memory in the first place. If you are
>running out of virtual memory space in the emulator, you can up your ulimit.
Actually, with this kind of allocation going on, you might very well have to
up *swap space*. Think of it: say the app allocs 1000 (what it thinks are
small) segments, for each of which the emulator allocs 64K: poof! you've got
64M w/o even trying hard.
In fact, this probably *is* the source of the thrashing, because the emulator
*clears* all of the memory it allocates (using a C *char_p++ = 0 loop, no less).
This causes the demand-zero pages to become real pages which are then cleared
twice: first (efficiently) by the kernel, then again (inefficiently) by the
emulator. These pages will now have to be written out to swap when they are
reclaimed. Thrash city.
A simple fix to the thrashing problem would be for the emulator to only clear
the memory which is actually used by the 286 app. You'd still be in danger of
running out of swap space, though. An environment variable to control the min
allocation size (default to 64K, set to something like 4K for the UDI apps)
would be nice. Shouldn't be too hard to implement (given the source, of
Kurt Gollhardt \ Nirvonics, Inc. -- Plainfield, NJ
Kurt.Gollhardt at nirvo.uucp /\ Software Design and Consulting
...!rutgers!nirvo!Kurt.Gollhardt / \
"It's all about people; not you and me or him and her, but *us*."
More information about the Comp.unix.i386