home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 8 Other / 08-Other.zip / SWPTST.ZIP / SWAPTST.DOC next >
Text File  |  1993-02-15  |  4KB  |  104 lines

  1.  
  2. OS/2 2.0:  Testing for Swapping Above 16MB--What's Happening Here?
  3. ==================================================================
  4.  
  5. OS/2 2.0 does not run programs in memory above 16MB if it determines that any
  6. of the adapters cannot access memory above 16MB.  (ISA adapters that do DMA
  7. data transfer are examples.)
  8.  
  9. If such systems have more than 16MB of memory, OS/2 sometimes uses the memory
  10. above 16MB as its primary swap area, and only swaps to disk when the memory
  11. swap area is filled.
  12.  
  13. However, under some circumstances, it cannot use memory above 16MB for swapping
  14. even when it is present.  (Is one example of this ROM shadowing that grabs
  15. memory in the wrong location?)
  16.  
  17. I wrote the two little programs in this ZIP hoping they would demonstrate
  18. whether OS/2 uses the memory above 16MB for swapping on my computer.
  19. Unfortunately they seem to give contradictory answers, so I still don't know.
  20.  
  21. Do you understand what's going on?  Is there a way to get a clear answer?
  22.  
  23. The Programs
  24. ------------
  25.  
  26. Note: Do not run these programs on a system where concurrent performance of
  27. other applications is important!  (E.g., a busy LAN server.)  Other than the
  28. performance hit they cause, they seem to be harmless.  They will end on their
  29. own; if you want to stop them yourself, press Ctrl-C.
  30.  
  31. If you use these programs, you assume all responsibility for the consequences.
  32.  
  33. Both programs have optional parameters which are described near the top of the
  34. source code files.
  35.  
  36. SwapTst1 does the following in a loop:
  37.  
  38.     Allocates a 256KB block of memory and does an update in every 4KB page.
  39.     Measures the time this takes.
  40.  
  41.     Queries the available memory and the size of the swap file.
  42.  
  43.     Displays time, available memory, and swap file size for this pass thru the
  44.     loop.
  45.  
  46.     Breaks out of the loop if the time for this pass thru the loop exceeds
  47.     a limiting value or if the swap file grows.
  48.  
  49. SwapTst2 does the following:
  50.  
  51.     Allocate a block of memory of one or more MB.
  52.  
  53.     Update each 4K page in one or more 256KB blocks a specified number of
  54.     times; measure the time this takes.  Display the time and the current size
  55.     of the swap file.
  56.  
  57.     Repeat the previous step, each time extending the updates by 256KB.  (In
  58.     other words, the first pass updates the pages in 256KB, the second pass
  59.     updates the pages in 512KB, the third updates 768KB, the fourth updates
  60.     1MB, etc.)  Stop if the time exceeds the limit or if the swap file grows.
  61.  
  62. The Problem
  63. -----------
  64.  
  65. On the test system with 32MB installed, running SwapTst1 causes swapping to 
  66. start when about 23MB has been allocated/updated.  (See file SwapTst1.Out.)  
  67. This seems to imply that the memory above 16MB is used as a swap area.
  68.  
  69. However, when running SwapTst2 with a memory block of 16MB, swapping starts
  70. when the area being updated reaches about 13MB.  (See file SwapTst2.Out.)
  71. This seems to imply that the memory above 16MB is NOT used as a swap area.
  72.  
  73. The results are the same regardless of whether ROM shadowing is enabled.
  74.  
  75. Can you explain this behaviour?  Is OS/2 using RAM above 16MB for swapping?
  76.  
  77. My Configuration
  78. ----------------
  79.  
  80. no name 50MHz 486DX mother board with 256KB cache, ISA bus, local bus,
  81.     AMI BIOS v1.3, and 32MB RAM
  82. Adaptec 1542B SCSI host adapter (ISA)
  83. C: boot drive (location of SWAPPER.DAT) is Toshiba MK-438FB SCSI drive 
  84.     formatted for HPFS
  85. no name Tseng ET4000 local bus video adapter, BIOS date 04/15/92, 1MB RAM
  86.  
  87. The Files in This ZIP
  88. ---------------------
  89.  
  90. SwapTst.Doc     this documentation
  91. SwapTstn.C      C source code
  92. SwapTstn.exe    executable created with IBM CSet/2
  93. SwapTstn.Out    output captured on the above configuration
  94.  
  95. The Bottom Line
  96. ---------------
  97.  
  98. Please get in touch with me if you can shed any light on this.  I'm very
  99. interested to see the output from your system; please include info on your
  100. configuration.  Many thanks!
  101.  
  102. Bill Lee, CompuServe 70441,2372; Edmonton, Alberta, Canada
  103.  
  104.