home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 8 Other
/
08-Other.zip
/
SWPTST.ZIP
/
SWAPTST.DOC
next >
Wrap
Text File
|
1993-02-15
|
4KB
|
104 lines
OS/2 2.0: Testing for Swapping Above 16MB--What's Happening Here?
==================================================================
OS/2 2.0 does not run programs in memory above 16MB if it determines that any
of the adapters cannot access memory above 16MB. (ISA adapters that do DMA
data transfer are examples.)
If such systems have more than 16MB of memory, OS/2 sometimes uses the memory
above 16MB as its primary swap area, and only swaps to disk when the memory
swap area is filled.
However, under some circumstances, it cannot use memory above 16MB for swapping
even when it is present. (Is one example of this ROM shadowing that grabs
memory in the wrong location?)
I wrote the two little programs in this ZIP hoping they would demonstrate
whether OS/2 uses the memory above 16MB for swapping on my computer.
Unfortunately they seem to give contradictory answers, so I still don't know.
Do you understand what's going on? Is there a way to get a clear answer?
The Programs
------------
Note: Do not run these programs on a system where concurrent performance of
other applications is important! (E.g., a busy LAN server.) Other than the
performance hit they cause, they seem to be harmless. They will end on their
own; if you want to stop them yourself, press Ctrl-C.
If you use these programs, you assume all responsibility for the consequences.
Both programs have optional parameters which are described near the top of the
source code files.
SwapTst1 does the following in a loop:
Allocates a 256KB block of memory and does an update in every 4KB page.
Measures the time this takes.
Queries the available memory and the size of the swap file.
Displays time, available memory, and swap file size for this pass thru the
loop.
Breaks out of the loop if the time for this pass thru the loop exceeds
a limiting value or if the swap file grows.
SwapTst2 does the following:
Allocate a block of memory of one or more MB.
Update each 4K page in one or more 256KB blocks a specified number of
times; measure the time this takes. Display the time and the current size
of the swap file.
Repeat the previous step, each time extending the updates by 256KB. (In
other words, the first pass updates the pages in 256KB, the second pass
updates the pages in 512KB, the third updates 768KB, the fourth updates
1MB, etc.) Stop if the time exceeds the limit or if the swap file grows.
The Problem
-----------
On the test system with 32MB installed, running SwapTst1 causes swapping to
start when about 23MB has been allocated/updated. (See file SwapTst1.Out.)
This seems to imply that the memory above 16MB is used as a swap area.
However, when running SwapTst2 with a memory block of 16MB, swapping starts
when the area being updated reaches about 13MB. (See file SwapTst2.Out.)
This seems to imply that the memory above 16MB is NOT used as a swap area.
The results are the same regardless of whether ROM shadowing is enabled.
Can you explain this behaviour? Is OS/2 using RAM above 16MB for swapping?
My Configuration
----------------
no name 50MHz 486DX mother board with 256KB cache, ISA bus, local bus,
AMI BIOS v1.3, and 32MB RAM
Adaptec 1542B SCSI host adapter (ISA)
C: boot drive (location of SWAPPER.DAT) is Toshiba MK-438FB SCSI drive
formatted for HPFS
no name Tseng ET4000 local bus video adapter, BIOS date 04/15/92, 1MB RAM
The Files in This ZIP
---------------------
SwapTst.Doc this documentation
SwapTstn.C C source code
SwapTstn.exe executable created with IBM CSet/2
SwapTstn.Out output captured on the above configuration
The Bottom Line
---------------
Please get in touch with me if you can shed any light on this. I'm very
interested to see the output from your system; please include info on your
configuration. Many thanks!
Bill Lee, CompuServe 70441,2372; Edmonton, Alberta, Canada