home *** CD-ROM | disk | FTP | other *** search
/ Windoware / WINDOWARE_1_6.iso / misctext / share04 / share2.txt
Text File  |  1991-02-18  |  4KB  |  101 lines

  1. The following  discussion  is  taken  from  Burton  L.  Alperson.
  2. "Fully Powered  Windows:   Getting  the  Most  Out  of  Your  386
  3. Computer."   (New York:   Brady  Books, 1991).  The text has been
  4. reformatted for electronic distribution.  Footnotes are indicated
  5. by angle brackets (< >).
  6.  
  7. I grant  permission for  electronic distribution of this material
  8. as long as it is passed along without modification.
  9.  
  10. Burton L. Alperson
  11.  
  12. _______________________________________________________________
  13.  
  14.                          SHARE Problems
  15.  
  16. DOS 4.x  introduced the  ability to  use hard  disks greater than
  17. 32MB in  size.   In  order  to  handle  larger  disk  partitions,
  18. Microsoft borrowed  some of  the functions  of a program normally
  19. used for networks, SHARE.EXE.
  20.  
  21. When you  have a  partition larger  than 32MB,  DOS  4.x  expects
  22. SHARE.EXE to be loaded.  If it cannot load this program, you will
  23. see an  error message  at boot  time, indicating that the program
  24. must be loaded for large media.
  25.  
  26. If you  are using DOS 4.x and you have a large partition, you may
  27. be running  SHARE.EXE without  even knowing it.  DOS searches the
  28. root directory  and installs  the program at boot time whether or
  29. not you have given explicit instructions to load it.
  30.  
  31. This  strategy   produced  few  problems  until  Windows  3  came
  32. along.<1>   Unless you  take special  steps,  you  can  run  into
  33. unexpected conflicts  because of the interaction of SHARE.EXE and
  34. Windows.   Two common  symptoms of  the problem are inappropriate
  35. "Resource busy"  messages  on  networks  and  "Sharing  violation
  36. . . ." messages on stand-alone machines.  At best, these messages
  37. are accompanied  by a  program lock  up.   At worst,  your  whole
  38. machine may freeze.  This is not a happy prospect.
  39.  
  40. One  solution  you  will  see  frequently  is  simply  to  remove
  41. SHARE.EXE from  your root  directory and ignore the error message
  42. you see  at boot time.  DO NOT FOLLOW THIS ADVICE!  SHARE.EXE is,
  43. in fact,  required for  safe operation  of large  media under DOS
  44. 4.x.   Even though  your machine may appear to function normally,
  45. YOU ARE  TAKING A  CHANCE ON CORRUPTING YOUR HARD DISK AND LOSING
  46. ALL YOUR DATA!
  47.  
  48. There are two parameters you can set for SHARE.EXE, and once they
  49. are set  properly, sharing  problems generally disappear.  If you
  50. install SHARE.EXE  in your AUTOEXEC.BAT file as a TSR, the syntax
  51. is
  52.  
  53. share [/f:space] [/l:locks]
  54.  
  55. If you install the program in your CONFIG.SYS file, the syntax is
  56.  
  57. install=share.exe [/f:space] [/l:locks]
  58.  
  59. It is  rarely necessary to adjust the /f:space parameter, and you
  60. can usually  omit it.<2>   The /l:locks parameter is the critical
  61. one.   "Each open file . . . requires at least one lock but could
  62. have dozens.   Each  time an  application requests a portion of a
  63. file (such as a record in a database) a lock on only that portion
  64. of the file that contains the desired information is issued.  The
  65. lock remains in effect until the application program specifically
  66. removes it."<3>
  67.  
  68. The default  value for  /l:locks is 60.  This value is frequently
  69. inadequate for  a stand-alone computer running Windows, and it is
  70. definitely inadequate  for a  network.   If you  are encountering
  71. sharing problems, try issuing the command
  72.  
  73. share /l:500
  74.  
  75. in your AUTOEXEC.BAT file or
  76.  
  77. install=share.exe /l:500
  78.  
  79. in  your  CONFIG.SYS  file.    If  you  still  encounter  sharing
  80. problems, try changing locks to a higher value (say 1000).
  81. _______________________________________________________________
  82.  
  83. FOOTNOTES
  84.  
  85. <1>The discussion of this problem is based on research by Richard
  86. Fink and  reported on  BIX.  The solution to the problem is based
  87. on research by Tom Filliman and reported on CompuServe.
  88.  
  89. <2>The /f:space  parameter specifies  the amount  of space  to be
  90. reserved for the storage of filepath information.  Each open file
  91. requires space  for the path + 11 bytes.  Microsoft estimates the
  92. average path  length to be 20 characters.  Thus the default value
  93. of 2048  bytes is  sufficient for  66 simultaneously open average
  94. files (2048  / (20  + 11)).   If  your files= statement specifies
  95. more than 66 files, or your average path length is longer than 20
  96. characters, you  may wish to adjust the parameter.  For most, the
  97. default value is more than adequate.
  98.  
  99. <3>From Tom  Filliman's research,  posted in the MSWIN library of
  100. CompuServe as SHARE.TXT.
  101.