home *** CD-ROM | disk | FTP | other *** search
/ Black Box 4 / BlackBox.cdr / textinfo / drtips.arj / 1301.TXT < prev    next >
Encoding:
Text File  |  1991-11-26  |  5.4 KB  |  116 lines

  1. Document 1301
  2. Basic Memory Optimization
  3.  
  4. Initials:
  5.         11/26/91
  6.     DRDOS 6.0
  7.  
  8. Description:
  9.  
  10.  System Memory Optimization
  11.  
  12. Because the DR DOS 6.0 operating system has been designed to work  
  13. with all IBM-compatible personal computers and software applications,  
  14. there is no single perfect memory setup that will optimize  
  15. memory use for all situations. Memory optimization will depend both  
  16. on your particular hardware setup and the software applications you  
  17. will be using. However, with a bit of trial-and-error system fine  
  18. tuning, you can optimize DR DOS memory management to meet your particular  
  19. needs. Below are techniques and suggestions that will help you optimize  
  20. your computer/software setup.
  21.  
  22. Changing Order of Memory Allocation
  23.  
  24. The first step in optimizing your system memory can be as simple as  
  25. rearranging the order in which memory blocks are assigned by the config.sys  
  26. and autoexec.bat files.  The general rule here is to use upper memory  
  27. and high memory as much as possible to free conventional memory for  
  28. your applications. With this in mind, you should typically use HIBUFFERS  
  29. and relocate the DR DOS kernel code to high memory by using the /BDOS=FFFF  
  30. option of the DR DOS memory management drivers, HIDOS.SYS and EMM386.SYS. 
  31. Also, if you have any add-on cards that use RAM, make sure that they are  
  32. configured so that their RAM is allocated from the beginning or end  
  33. of upper memory.  For example, place a network card immediately above  
  34. the video RAM area instead of in the middle of upper memory.
  35.  
  36. Following this, device drivers and TSRs can be loaded into upper memory.  
  37. For best memory allocation, those drivers and TSRs that occupy the  
  38. largest blocks of memory should be loaded first and contiguously.  
  39. For example, if you need to load three device drivers and two TSR  
  40. programs, order them in descending order in your config.sys file,  
  41. beginning with the driver that will occupy the most RAM, to the driver  
  42. or TSR that will occupy the least RAM. The documentation for the drivers  
  43. and TSRs should indicate the amount of RAM they require; however,  
  44. if they do not, you can determine this yourself by using the following  
  45. procedure:
  46. 1. Load the driver or TSR.
  47. 2. Use the MEM /U or /B command to see a report of your  
  48. memory usage (see Chapter 10 of the DR DOS 6.0 User Guide for  
  49. a full description of the MEM command and Chapter 12 regarding loading  
  50. device drivers and TSRs).
  51.  
  52. Expanding Files
  53.  
  54. If, after determining the size of your drivers and TSRs and loading  
  55. them into high memory, a driver or program fails to run properly or  
  56. produces an out of memory error message, the problem might  
  57. be that the driver or program is expanding itself in RAM.  
  58.  
  59. Some device drivers and TSR programs occupy a minimal amount of RAM  
  60. after they are loaded into memory, but, while initializing, might  
  61. actually expand and take up considerably more RAM than they will ultimately  
  62. need. 
  63. Another method of verifying the program's true RAM size is to load  
  64. it into conventional memory (i.e., by deactivating the HIDEVICE, HIINSTALL,  
  65. or HILOAD commands), activate the program, and then run the MEM /B  
  66. command to see the actual amount of RAM the program occupies. If the  
  67. program or driver is expanding itself in RAM, and you want  
  68. to load it into upper memory, you will have to allow sufficient upper  
  69. memory RAM to accommodate the initialization size of the program.  
  70. It might be necessary to use trial-and-error to determine this size.  See  
  71. also "Using MemoryMAX with NetWare" on page 33 for an example.
  72.  
  73. Example 
  74.  
  75. In the following example, let's assume you want to load Device Drivers  
  76. 1, 2, and 3, and TSR programs 1 and 2, each requiring the following  
  77. amounts of memory:
  78.  
  79. Driver #1       =  13Kbyte of RAM
  80. Driver # 2      =  10Kbyte of RAM 
  81. Driver # 3      =  16Kbyte of RAM 
  82. TSR # 1 =  4Kbyte of RAM 
  83. TSR # 2 =  6Kbyte of RAM
  84.  
  85. Using the MemoryMAX HIDEVICE and/or HIINSTALL commands, enter these  
  86. lines into your config.sys file:
  87.  
  88. HIDEVICE = C:\DRIVER#3.SYS      ; which uses 16kb RAM 
  89. HIDEVICE = C:\DRIVER#1.SYS      ; which uses 13kb RAM 
  90. HIDEVICE = C:\DRIVER#2.SYS      ; which uses 10kb RAM 
  91. HIINSTALL = TSR#2               ; which uses 6kb RAM 
  92. HIINSTALL = TSR#1               ; which uses 4kb RAM
  93.  
  94. Note:
  95. There can be exceptions to loading TSRs and drivers in  
  96. the "largest first" system described previously. Some device  
  97. drivers must be loaded in a specific order. Read the manufacturer's  
  98. documentation carefully before installing any driver.
  99.  
  100. Note that in the above example, you can load the two TSRs with the  
  101. HILOAD command placed in the autoexec.bat file. For a discussion  
  102. of the MemoryMAX HIINSTALL, HIDEVICE, and HILOAD commands, see "MemoryMAX  
  103. System Commands and Drivers" on page 4 in the DR DOS 6.0 User Guide.
  104.  
  105. LIM Page Frame
  106.  
  107. Some applications run better with the availability of LIM memory (sometimes  
  108. called EMS, or expanded memory). The documentation for each of your  
  109. applications will indicate if LIM memory is required.
  110.  
  111. If the application does not require LIM memory, be sure that no LIM  
  112. page frame is defined. This will save 64 Kbytes of upper memory. In  
  113. the EMM386.SYS line of your config.sys file, disable the page frame  
  114. with the switch /F=NONE. If using HIDOS.SYS on a machine with a LIM  
  115. 4.0 memory card, you can disable the page frame by specifying /CHIPSET=EMSALL.
  116.