home *** CD-ROM | disk | FTP | other *** search
- The following discussion is taken from Burton L. Alperson.
- "Fully Powered Windows: Getting the Most Out of Your 386
- Computer." (New York: Brady Books, 1991). The text has been
- reformatted for electronic distribution. Footnotes are indicated
- by angle brackets (< >).
-
- I grant permission for electronic distribution of this material
- as long as it is passed along without modification.
-
- Burton L. Alperson
-
- _______________________________________________________________
-
- SHARE Problems
-
- DOS 4.x introduced the ability to use hard disks greater than
- 32MB in size. In order to handle larger disk partitions,
- Microsoft borrowed some of the functions of a program normally
- used for networks, SHARE.EXE.
-
- When you have a partition larger than 32MB, DOS 4.x expects
- SHARE.EXE to be loaded. If it cannot load this program, you will
- see an error message at boot time, indicating that the program
- must be loaded for large media.
-
- If you are using DOS 4.x and you have a large partition, you may
- be running SHARE.EXE without even knowing it. DOS searches the
- root directory and installs the program at boot time whether or
- not you have given explicit instructions to load it.
-
- This strategy produced few problems until Windows 3 came
- along.<1> Unless you take special steps, you can run into
- unexpected conflicts because of the interaction of SHARE.EXE and
- Windows. Two common symptoms of the problem are inappropriate
- "Resource busy" messages on networks and "Sharing violation
- . . ." messages on stand-alone machines. At best, these messages
- are accompanied by a program lock up. At worst, your whole
- machine may freeze. This is not a happy prospect.
-
- One solution you will see frequently is simply to remove
- SHARE.EXE from your root directory and ignore the error message
- you see at boot time. DO NOT FOLLOW THIS ADVICE! SHARE.EXE is,
- in fact, required for safe operation of large media under DOS
- 4.x. Even though your machine may appear to function normally,
- YOU ARE TAKING A CHANCE ON CORRUPTING YOUR HARD DISK AND LOSING
- ALL YOUR DATA!
-
- There are two parameters you can set for SHARE.EXE, and once they
- are set properly, sharing problems generally disappear. If you
- install SHARE.EXE in your AUTOEXEC.BAT file as a TSR, the syntax
- is
-
- share [/f:space] [/l:locks]
-
- If you install the program in your CONFIG.SYS file, the syntax is
-
- install=share.exe [/f:space] [/l:locks]
-
- It is rarely necessary to adjust the /f:space parameter, and you
- can usually omit it.<2> The /l:locks parameter is the critical
- one. "Each open file . . . requires at least one lock but could
- have dozens. Each time an application requests a portion of a
- file (such as a record in a database) a lock on only that portion
- of the file that contains the desired information is issued. The
- lock remains in effect until the application program specifically
- removes it."<3>
-
- The default value for /l:locks is 60. This value is frequently
- inadequate for a stand-alone computer running Windows, and it is
- definitely inadequate for a network. If you are encountering
- sharing problems, try issuing the command
-
- share /l:500
-
- in your AUTOEXEC.BAT file or
-
- install=share.exe /l:500
-
- in your CONFIG.SYS file. If you still encounter sharing
- problems, try changing locks to a higher value (say 1000).
- _______________________________________________________________
-
- FOOTNOTES
-
- <1>The discussion of this problem is based on research by Richard
- Fink and reported on BIX. The solution to the problem is based
- on research by Tom Filliman and reported on CompuServe.
-
- <2>The /f:space parameter specifies the amount of space to be
- reserved for the storage of filepath information. Each open file
- requires space for the path + 11 bytes. Microsoft estimates the
- average path length to be 20 characters. Thus the default value
- of 2048 bytes is sufficient for 66 simultaneously open average
- files (2048 / (20 + 11)). If your files= statement specifies
- more than 66 files, or your average path length is longer than 20
- characters, you may wish to adjust the parameter. For most, the
- default value is more than adequate.
-
- <3>From Tom Filliman's research, posted in the MSWIN library of
- CompuServe as SHARE.TXT.
-