home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / World_Of_Computer_Software-02-387-Vol-3of3.iso / q / qemmtec.zip / PROTMAN.TEC < prev    next >
Text File  |  1993-03-02  |  9KB  |  152 lines

  1. ID:PM QEMM-386: Loading PROTMAN
  2. Quarterdeck Technical Bulletin #173
  3. by Quarterdeck Testing and Compatibility Department
  4. Last revision: 2 March 1993
  5.  
  6.                         LOADING PROTMAN WITH QEMM-386
  7.  
  8.      If you do not care to understand what PROTMAN does, you may skip the
  9. "PROTMAN" section and go directly to "USING OPTIMIZE WITH PROTMAN" below.
  10.  
  11.      NDIS is a network protocol that separates hardware from software.  Any
  12. network software that supports NDIS can work with any network card for which
  13. an NDIS driver exists.  In turn this allows the manufacturer of a network card
  14. to write one NDIS driver which will then allow any network software that
  15. supports NDIS to use their card.  Microsoft's LAN Manager, 10Net, and DEC's
  16. Pathworks are some examples of networks that support NDIS.  Some network
  17. software gives you a choice, writing specific drivers for their own cards and
  18. accommodating other network cards through NDIS.
  19.  
  20. PROTMAN
  21.      Common to all NDIS network software is a program called PROTMAN.  While
  22. Microsoft calls this program PROTMAN.DOS, Tiara and Sitka call it 10PROT.DOS,
  23. and DEC calls it PROTMAN.SYS.  They are all the same program.  You can tell
  24. because device drivers have an internal name which they store beginning at
  25. byte 0Ah and all of these programs have the same internal name:  PROTMAN$.
  26.      PROTMAN is short for "protocol manager".  It provides services to network
  27. drivers that load after it to reconcile the protocol used by the network card
  28. driver and network software.
  29.      PROTMAN does a curious thing:  It writes some code and data into memory
  30. at about 90K beneath the top of the region into which PROTMAN loads. Later
  31. network drivers that use the services of PROTMAN while they load are
  32. redirected to use the code and data in this area.  Apparently PROTMAN'S
  33. authors expected it to load into conventional memory, where 90K from the top
  34. of conventional memory is 550K from the bottom of memory on a system with 640K
  35. conventional memory.
  36.      When you load it high you may well load it into a region not large enough
  37. to accommodate this stuff at 90K beneath the top of memory.  For example, if
  38. you load it into B000-B7FF, 90K beneath the top of memory is in the video
  39. card's graphics address space.  This causes the loading of subsequent network
  40. programs that use the services of PROTMAN to fail when it points them into the
  41. video card's memory when they try to use PROTMAN's services.  If you load
  42. PROTMAN into a region 90K large, PROTMAN will overwrite the code it loads low
  43. with this stuff it loads into 90K beneath the top of its region.
  44.      With the advent of version 5 Microsoft's DOS began to load programs high
  45. and users of networks that use PROTMAN would have suffered from the same
  46. problem when they loaded PROTMAN with DEVICEHIGH.  To "cure" this problem
  47. Microsoft did not re-write PROTMAN to correct this programming mistake but
  48. made DOS itself detect when it loaded a driver with an internal name of
  49. PROTMAN$ and make Int 12 (the BIOS function that reports the top of memory)
  50. report that the top of memory is at 575K (23F in hexadecimal) instead of the
  51. real top-of-memory.  You can find "PROTMAN$" embedded in IO.SYS (or IBMBIO.COM
  52. for IBM DOS) of DOS 5 (These are one of the two hidden files that load
  53. invisibly when you boot).  When you load a device driver with LOADHI.SYS DOS
  54. sees \LOADHI as the device name and does not change the number Int 12 reports
  55. so PROTMAN may write the code/data it loads into 90K beneath the top-of-memory
  56. into an inappropriate place.
  57.      Most programs use more memory to load than they need to remain resident.
  58. Programs do not report how much memory they need to load, nor does DOS.  For
  59. LOADHI to load a program high, it must put it into a region where there is
  60. enough memory to load the program, not just enough to accommodate its resident
  61. size.  Since neither the program itself nor DOS will report how much memory a
  62. program needs to load, OPTIMIZE must figure it out for itself.  In order to
  63. figure out how much memory a program takes to load, OPTIMIZE, in its second
  64. step, loads all programs in the CONFIG and AUTOEXEC with LOADHI /GS.  With the
  65. /GS parameter LOADHI writes "LOADHISIGNATURE!" all over conventional memory
  66. (beginning on top of the currently available address) BEFORE it loads the
  67. program it loads.  Then after LOADHI has loaded its program it searches beyond
  68. the resident portion of the just-loaded program to find where LOADHISIGNATURE!
  69. begins again.  The reasoning is that the program LOADHI just loaded must have
  70. written over all the absent "LOADHISIGNATURE!"s beyond the memory it took to
  71. stay resident, and thus needs that much more space to load.
  72.      DOS has no means of allocating memory from the top down.  Thus PROTMAN
  73. has no means of reserving the address space into which it has loaded its
  74. code/data at 90K beneath the top-of-memory:  they are orphan bytes at the
  75. mercy of any program that has a legitimate use for this portion of the address
  76. space.  The first LOADHI/GS after PROTMAN loads wipes out this code/data when
  77. it writes "LOADHISIGNATURE!" all over it.  When a subsequent network program
  78. that uses the services of PROTMAN loads this code/data is not in place and the
  79. loading of the network program fails.
  80.      You can duplicate this problem without QEMM-386 or OPTIMIZE by loading
  81. PROTMAN in the CONFIG then not loading the network drivers you load in the
  82. AUTOEXEC.  Then load some large program, like Wordperfect or Lotus or Quattro,
  83. etc., which will load itself into all of your conventional memory, over-
  84. writing the code/data PROTMAN has loaded into 90K beneath the top of
  85. conventional memory.  Then load the remainder of your network drivers and they
  86. will fail in the same manner.
  87.  
  88. USING OPTIMIZE WITH PROTMAN
  89.      As discussed in the PROTMAN section above you must resort to a
  90. "trick" to use OPTIMIZE with PROTMAN.  The trick is to make PROTMAN load high
  91. into a sufficiently large region during the second step of OPTIMIZE and load
  92. low in the third step.
  93.  
  94. 1)   Place the RAM parameter on QEMM386.SYS in the CONFIG.SYS file.  Reboot
  95.      and make sure that the biggest High RAM region (as reported on Manifest's
  96.      First Meg/Overview screen) is at least 96K in size.
  97.           If you do not have a High RAM region at least 96K big you cannot run
  98.      OPTIMIZE with PROTMAN and you should NOT proceed to step 2.  Instead you
  99.      must manually place LOADHI.SYS and LOADHI.COM on every line in the
  100.      CONFIG.SYS and AUTOEXEC.BAT file that contains a program that you want to
  101.      load high.  (See the LOADHI chapter in your QEMM-386 manual for more
  102.      details.)  Do not, however, place LOADHI on the PROTMAN line.  Then
  103.      reboot without running OPTIMIZE.  This configuration should let you
  104.      successfully load most of your programs high.
  105.  
  106. 2)   If you have any programs that allocate Upper Memory Blocks (UMBs)
  107.      through the Extended Memory Specification you must stop them from doing
  108.      so (by using the programs' own parameters) before proceeding further.
  109.      Such programs can interfere with OPTIMIZE's calculations under any
  110.      circumstances; with the procedure that we are about to use a program that
  111.      allocates a UMB may overwrite the code/data that PROTMAN writes into
  112.      90K below top-of-memory.  Although this is a temporary precaution for
  113.      running OPTIMIZE with PROTMAN it is a good practice generally because
  114.      LOADHI can load a program into a specific region, allowing OPTIMIZE to
  115.      configure the programs loaded into High RAM in the most efficient manner.
  116.      If you desire you can revert to letting programs load themselves high
  117.      after the completion of OPTIMIZE.
  118.  
  119. 3)   If your biggest High RAM region is 96K or larger start OPTIMIZE.  Let
  120.      OPTIMIZE modify your CONFIG.SYS and AUTOEXEC.BAT files in preparation for
  121.      the Detection Phase.  When you see the OPTIMIZE screen titled "DETECTION
  122.      PHASE," (before the first re-boot) hit Esc, then F1, to break out of
  123.      OPTIMIZE.
  124.  
  125. 4)   Use an editor to edit the PROTMAN line in the CONFIG.SYS file.  Remove
  126.      all the parameters to LOADHI.SYS on that line.  (There should be two:  a
  127.      /GS parameter that directs the /GETSIZE data to LOADHI.OPT, and a LABEL
  128.      parameter.)  Leave LOADHI.SYS and all PROTMAN's parameters on the line;
  129.      leave all the other lines alone.
  130.  
  131.      For example if the PROTMAN line in the CONFIG.SYS says:
  132.  
  133.      DEVICE=C:\QEMM\LOADHI.SYS /GS:C:\QEMM\LOADHI.OPT /LABEL:AB
  134.      ...C:\LANMAN\PROTMAN.DOS /I:C:\LANMAN\PROTOCOL.INI
  135.  
  136.      (the above is all one line in the CONFIG.SYS) then change the line to:
  137.  
  138. DEVICE=C:\QEMM\LOADHI.SYS C:\LANMAN\PROTMAN.DOS /I:C:\LANMAN\PROTOCOL.INI
  139.  
  140. 5)   Reboot and let OPTIMIZE complete normally.
  141.  
  142.           When you're all done, PROTMAN will be loaded low, but it only uses
  143.      100 bytes or so (the newer PROTMAN may use about 6K).  All other programs
  144.      will be OPTIMIZEd.
  145.  
  146.   ************************************************************************
  147.   *          Trademarks are property of their respective owners.         *
  148.   *This technical note may be copied and distributed freely as long as it*
  149.   *is distributed in its entirety and it is not distributed for profit.  *
  150.   *         Copyright (C) 1992-3 by Quarterdeck Office Systems           *
  151.   ************************ E N D   O F   F I L E *************************
  152.