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

  1. Document 1300
  2. Memory Management
  3.  
  4. Initials:
  5.         11/26/91
  6.     DRDOS 6.0
  7.  
  8. Keywords:
  9.         EMM386.SYS
  10.         HIDOS.SYS
  11.         EMMXMA.SYS
  12.         UMB
  13.         HMA
  14.         LIM
  15.         EMS
  16.         XMS
  17.     
  18. Description:
  19.  
  20.   Memory Management Overview
  21.  
  22. The purpose of a memory management system is to effectively manage  
  23. the Random Access Memory (RAM) available on your computer and to maximize  
  24. memory in which to load your applications. When personal computers  
  25. were first introduced, they operated with as little as 64 kilobytes  
  26. (Kbytes) of RAM. However, as PCs became more sophisticated and powerful,  
  27. so did the application programs that ran on them. 
  28.  
  29. Today, modern applications frequently require 540 Kbytes of memory,  
  30. or more, to load. Ten years ago, that amount of required RAM would  
  31. have seemed vastly excessive. Many common configurations do not have  
  32. sufficient memory for proper fractioning of large applications.
  33.  
  34. And, although today's computers typically have over 1 Mbyte of RAM  
  35. available, only a portion of the first 640 Kbytes are available for  
  36. DOS applications.  Device drivers and TSRs are also typically loaded  
  37. into this area, reducing the memory available for an application.
  38.  
  39. Memory management software is designed to overcome the problem of  
  40. insufficient conventional memory. The DR DOS memory management system  
  41. is called MemoryMAX.
  42.  
  43.  The DR DOS MemoryMAX System
  44.  
  45. The term MemoryMAX describes the collection of device drivers and  
  46. commands that are used for memory management under the DR DOS 6.0  
  47. operating system to take advantage of all RAM memory available  
  48. on your computer.
  49.  
  50. The MemoryMAX system is designed to free-up as much conventional memory  
  51. as possible.  It achieves this goal by utilizing certain previously  
  52. unused areas of high and lower memory and by remapping and moving  
  53. other memory areas. 
  54.  
  55. The MemoryMAX system extends the amount of memory available to applications,  
  56. so that even with network drivers and TSRs loaded, there can still  
  57. be 620 Kbytes, or more, conventional memory available. However, the  
  58. exact amount of additional memory that MemoryMAX provides is dependent  
  59. on your particular system's configuration.
  60.  
  61. The MemoryMAX system consists of three device drivers and six commands.  
  62. The MemoryMAX device drivers and commands are detailed in Chapter  
  63. 11 of the DR DOS 6.0 User Guide, "Customizing your System".  This  
  64. table lists MemoryMAX drivers and features by various hardware configurations.
  65.  
  66. MemoryMAX Features Available with Hardware/Device Driver Combinations
  67. ________________________________________________________________________
  68. Applicable  | Driver    | LIM | DR DOS Kernel     |  XMS | DR DOS 
  69. Hardware    |           |     | Kernel Relocation |      | Upper Memory
  70. ------------------------------|-------------------|------|--------------
  71. 386sx, 386  |EMM386.SYS | YES |     YES           |  YES |  YES
  72. or 486      |           |     |                   |      |
  73. ------------|-----------|-----|-------------------|------|--------------
  74. 386sx,386,  |HIDOS.SYS  |     |                   |      |
  75. or 486,     |with Third-|  ?  |     YES           |  YES |  N/S
  76.         |Party XMS  |     |                   |      |
  77.         |Memory Mgr |     |                   |      | 
  78. ------------|-----------|-----|-------------------|------|--------------
  79. IBM PS/2    |EMMXMA.SYS | YES |     N/S           |  N/S |  N/S    
  80. 80286 with  |           |     |                   |      |              
  81. IBM XMA card|           |     |                   |      |                 
  82. ------------|-----------|-----|-------------------|------|--------------
  83. 80286 with  | HIDOS.SYS | N/S |     YES           |  YES |  N/S
  84. Extended Mem|           |     |                   |      | 
  85. ------------|-----------|-----|-------------------|------|--------------
  86. 80286 with  | HIDOS.SYS | N/S |     YES           |  YES |  YES
  87. Mappable    |           |     |                   |      |
  88. Shadow Ram  |           |     |                   |      | 
  89. with Ext    |           |     |                   |      |   
  90. Memory      |           |     |                   |      | 
  91. ------------|-----------|-----|-------------------|------|--------------
  92. 80286 with  | HIDOS.SYS | N/S |     YES           |  YES |  YES
  93. Mappable    |           |     |                   |      |
  94. Shadow Ram  |           |     |                   |      |
  95. No Extended |           |     |                   |      |
  96. Memory      |           |     |                   |      | 
  97. ------------|-----------|-----|-------------------|------|--------------
  98. 80286 with  | HIDOS.SYS | N/S |     YES           |  YES |  YES
  99. NeAT, LeAP, |           |     |                   |      | 
  100. or SCAT     |           |     |                   |      | 
  101. ------------|-----------|-----|-------------------|------|--------------
  102. 80286 with  | HIDOS.SYS | YES |     YES           |  YES |  YES
  103. LIM 4.0     | with third|     |                   |      |
  104. driver and  | party     |     |                   |      |
  105. extended    | driver    |     |                   |      |
  106. memory      |           |     |                   |      |
  107. ------------|-----------|-----|-------------------|------|--------------
  108. 8088/8086/  | HIDOS.SYS | YES |     YES           |  YES |  YES
  109. 80286 with  | with third|     |                   |      |  
  110. LIM 4.0 EMS | party     |     |                   |      |
  111. card and no | LIM 4.0   |     |                   |      |
  112. extended    | driver    |     |                   |      | 
  113. ------------|-----------|-----|-------------------|------|--------------
  114. Supported feature = YES
  115. Unsupported feature = N/S 
  116. ? = This entry depends on the features offered by third-party memory manager
  117.  
  118. If upper memory is not supported, HIDEVICE, HIBUFFERS,  
  119. HIINSTALL, and HILOAD commands have no effect.  HIDOS=ON|OFF might  
  120. be supported if the third-party memory manager allocates XMS upper  
  121. memory blocks (UMBs).
  122.  
  123. MemoryMAX System Commands and Drivers
  124.  
  125. The following is a listing and brief description of the components  
  126. of the MemoryMAX memory management system. Refer to the DR DOS  
  127. 6.0 User Guide for a complete description of each of these features  
  128. and commands.
  129.    
  130.  EMM386.SYS
  131.  
  132. EMM386.SYS is a device driver that allows the DR DOS 6.0 operating  
  133. system to make better use of the memory available on Intel 
  134. i386, i386SX, and i486-based computers. Using EMM386.SYS,  
  135. you can use LIM 4.0 expanded memory without the need for special add-on  
  136. cards; relocate the DR DOS operating system kernel to upper or high  
  137. memory, and enable upper memory to be used for TSRs, device drivers  
  138. and operating system data structures by using the /AUTOSCAN, /INCLUDE,  
  139. /EXCLUDE, and /USE options. You can also add up to 96 Kbytes to conventional  
  140. memory using the /VIDEO option.
  141.  
  142.  HIDOS.SYS
  143.  
  144. If you have an Intel 80286-based computer with extended memory, you  
  145. can use the HIDOS.SYS driver to relocate the DR DOS operating system  
  146. kernel to high memory (see the /BDOS option). On computers that support  
  147. Shadow RAM, HIDOS.SYS relocates the kernel to upper memory, and enables  
  148. you to load TSRs, drivers and operating system data structures into  
  149. upper memory. Using the /VIDEO option, you can also add up to 96 Kbytes  
  150. to conventional memory.
  151.  
  152. Example config.sys entry:
  153.  
  154. DEVICE=C:\DRDOS\HIDOS.SYS /BDOS=AUTO
  155.  
  156. HIDOS.SYS can also work in conjunction with LIM 4.0 expanded memory  
  157. (EMS) device drivers to provide upper memory support on 8088/8086/80286  
  158. computers. This feature is detailed in the readme file or Release  
  159. Notes.
  160.  
  161. Note:
  162. The HIDOS.SYS driver should not be confused with the  
  163. similarly-named DR DOS MemoryMAX "HIDOS = ON/OFF" command  
  164. (see below). 
  165.  
  166.  EMMXMA.SYS
  167.  
  168. Use this driver on PS/2 80286 computers with IBM XMA and 100% compatible  
  169. memory cards, to convert memory from extended to LIM expanded memory.
  170. Example config.sys entry:
  171.  
  172. DEVICE=C:\DRDOS\EMMXMA.SYS /FRAME=D000
  173.  
  174. Note:
  175. The EMMXMA.SYS driver can be used only on PS/2 computers,  
  176. and you cannot use the EMMXMA.SYS driver with any third-party memory  
  177. managers (e.g., the Qualitas 386/MAX, or the Quarterdeck Expanded  
  178. Memory Manager 386). You can use HIDOS.SYS following EMMXMA.SYS  
  179. to obtain upper memory support.
  180.  
  181. The MemoryMAX commands listed below can be used when upper memory  
  182. is supported by loading the EMM386.SYS or HIDOS.SYS drivers in the  
  183. config.sys file.
  184.  
  185.  HIBUFFERS
  186.  
  187. Use HIBUFFERS to specify the number of memory buffers that the DR  
  188. DOS 6.0 operating system uses. HIBUFFERS performs the same function  
  189. as BUFFERS, except that HIBUFFERS allocates as many buffers as possible  
  190. into high memory rather than conventional memory. 
  191. The following entry in your config.sys file sets the number of buffers  
  192. to 20 and forces the DR DOS 6.0 operating system to allocate as many  
  193. as possible from high memory.  
  194.  
  195. Example config.sys entry:
  196.  
  197. HIBUFFERS = 20
  198.  
  199.  HIDEVICE
  200.  
  201. The HIDEVICE command loads specified device drivers into upper memory.  
  202. If the device is unable to load into upper memory using HIDEVICE,  
  203. it will be loaded into conventional memory. The following command  
  204. loads the ANSI.SYS device driver into upper memory:
  205.  
  206. HIDEVICE=C:\DRDOS\ANSI.SYS
  207.  
  208.  HIDOS
  209.  
  210. The HIDOS command relocates as much of the DR DOS operating system  
  211. data structures as possible into upper memory. The default is OFF.  
  212.  
  213. Example config.sys entry:
  214.  
  215. HIDOS=ON
  216.  
  217.  HIINSTALL
  218.  
  219. The HIINSTALL command loads specified TSRs into upper memory. If there  
  220. is insufficient upper memory for the specified TSR, it is loaded into  
  221. conventional memory.
  222. Although similar to the HILOAD command (see below), HIINSTALL must  
  223. be loaded via the config.sys file.  Use HIINSTALL when you want  
  224. a TSR permanently loaded at boot time because of best memory allocation  
  225. (see the example in Chapter 2). The following command installs the  
  226. CURSOR program into upper memory:
  227.  
  228. HIINSTALL=C:\DRDOS\CURSOR.EXE
  229.  
  230. Notice that you must give the full path name to the program and its  
  231. extension (.com or .exe).
  232.  
  233.  HILOAD
  234.  
  235. HILOAD loads specified TSRs and network drivers into upper memory.  
  236. HILOAD is similar to the HIINSTALL command (which must be loaded using  
  237. the config.sys file), but can be executed from the command line  
  238. or from the autoexec.bat or other batch file.
  239. Before using HILOAD, you must be sure that upper memory has been enabled  
  240. with the MEMMAX +U command.  
  241.  
  242. For example,
  243.  
  244. C:> HILOAD C:\LAN\NET3
  245.  
  246.  MEMMAX
  247.  
  248. The MEMMAX command selectively enables and disables those enhanced  
  249. memory areas provided by the DR DOS 6.0 operating system that might  
  250. conflict with some applications. By using the MEMMAX +V switch, MEMMAX  
  251. also enables extra memory if it has been reserved in the video adapter  
  252. area by EMM386.SYS or HIDOS.SYS. You can execute the MEMMAX command  
  253. from the command line or a batch file (see Chapter 10 of the DR  
  254. DOS 6.0 User Guide).
  255.  
  256. Note:
  257. If you enabled the video adapter area by using MEMMAX  
  258. +V, you must use the MEMMAX -V command to release this memory before  
  259. loading graphics applications.
  260.  
  261. The HIDOS.SYS and EMM386.SYS device drivers can increase the conventional  
  262. memory available to applications by using upper memory. However, some  
  263. programs fail because they do not expect to find memory in this region.  
  264. MEMMAX allows you to selectively enable and disable upper and lower  
  265. memory from the command line or from batch files.   MEMMAX +U and  
  266. -U will respectively enable and disable upper memory.  The DR DOS  
  267. 6.0 installation will place the command "MEMMAX -U > nul"  
  268. into the autoexec.bat file.  The "> nul" disables the display  
  269. of the MEMMAX status message on the screen.
  270.  
  271. MEMMAX -L and +L will respectively disable and enable the first 64  
  272. Kbytes of conventional memory.  This region is termed "low memory". Usually  
  273. the operating system resides in low memory; however, by using the  
  274. DR DOS 6.0 MemoryMAX features, most of this area can be made available  
  275. for running applications.  Some applications were written using packing  
  276. utilities that become confused when run in this low memory.  If this  
  277. happens, the following message appears:
  278.  
  279. "Packed file is corrupt".
  280.  
  281. To correct this situation, use the MEMMAX -L command to disable low  
  282. memory before running the application.  After exiting the application,  
  283. use MEMMAX +L to enable the low memory area once again.
  284.  
  285. Example:
  286. The following example shows how you can use the MEMMAX command in  
  287. a batch file that loads network drivers into upper memory. The example  
  288. assumes that you have already loaded a DR DOS 6.0 device driver that  
  289. supports upper memory.
  290.  
  291. REM * * * MEMMMAX to open upper memory * * * 
  292. MEMMAX +U 
  293. HILOAD C:\LAN\IPX 
  294. HILOAD C:\LAN\NET3 
  295. REM * * * * Disable lower memory * * *  
  296. MEMMAX -L 
  297. I:
  298. CD LOGIN 
  299. REM * * * * Reopen lower memory * * * * 
  300. MEMMAX +L
  301.  
  302.  Conclusion
  303.  
  304. While the MemoryMAX memory system works well with most application  
  305. programs, you might still encounter occasional difficulty.  The following  
  306. chapters present the steps recommended for resolving such memory conflicts.
  307.