home *** CD-ROM | disk | FTP | other *** search
/ Hall of Fame / HallofFameCDROM.cdr / lan1 / blts.lzh / BLT12 < prev    next >
Text File  |  1990-04-09  |  6KB  |  118 lines

  1.  
  2. SysOp's note:  The following information is based soley on the
  3. knowledge and experiences of Tom Filliman.  I'd like to thank him for
  4. passing along this info, it is thorough and definitive.
  5.  
  6. Recently we attempted to configure LANtastic to run with Dataease on
  7. a six station network. After carefully following all the
  8. instructions, Dataease would still hang after a few operations with a
  9. continual "Resource Busy" message. A call to Artisoft yields "Double
  10. the /F and /L parameters in SHARE.EXE".  That suggestion helps but
  11. does not fully alleviate the situation. A call to Dataease technical
  12. support yields "Set /L:1000 /F:32000".  Okay, that solves the problem
  13. but knocks the file server into dedicated mode [running out of
  14. memory], still not an acceptable solution...
  15.  
  16. Enter Foxpro/LAN.  Again, similar network hangs result, but Fox
  17. provides some critical information:  We're running out of LOCKS! Time
  18. to investigate the SHARE program.
  19.  
  20.                        SHARE.EXE Explained
  21.  
  22. Disclaimer: The information contained here represents a
  23. combination of reference materials, experimentation, an interview
  24. with a programmer at Microsoft, and others. As can be seen from
  25. the dialogue above, not too many people understand what SHARE
  26. really does. I take no responsibility for the consequences
  27. resulting from the use of this information, and can not guarantee
  28. its accuracy. 
  29.  
  30. PURPOSE:
  31. SHARE is an extension to DOS which provides information to
  32. programs (such as LANtastic) about the current status of a file
  33. or a section of a file. It makes decisions about the ability of
  34. an application program to acquire information from a file or
  35. write information to a file. It helps multiple users "share"
  36. files.
  37.  
  38. REQUIRED INFORMATION:
  39. During SHARE's execution, it requires memory space to store two
  40. data tables. The amount of space for these tables and
  41. consequently their resulting capacity is controlled at invocation
  42. by two parameters /F and /L. If one or both parameters are
  43. missing then defaults are used [explained below]. The defaults
  44. are fine for most applications, but can easily be violated by a
  45. large number of users or applications that behave in certain
  46. ways. Unfortunately, when SHARE runs out of space to do its job,
  47. applications seldom report the correct error message. Therefore,
  48. a good understanding of what these parameters mean can solve a
  49. lot of network related problems.
  50.  
  51. SHARE INTERNAL OPERATION:
  52. When a network file is opened for use in a program. SHARE in
  53. conjunction with DOS performs a number of checks on the request.
  54. First, if not already in use by another user, SHARE enters the
  55. complete pathname for the file in its internal table and assigns
  56. that entry an internal handle number. It then enters in a second
  57. table the handle and a number which represents the file area
  58. being used and how it is being used by this particular
  59. application. This construction is called a LOCK! If the file
  60. being used had already been opened by another user, it already
  61. has an entry in the table and a unique handle. In this situation,
  62. SHARE scans the lock table for LOCKS which match this file, then
  63. makes a determination on whether or not to grant the file request
  64. based on possible LOCK collisions. This mechanism generates the
  65. infamous "Sharing violation error . . ."
  66.  
  67. THE /F PARAMETER:
  68. The first data table that SHARE maintains is a two dimensional
  69. array that stores the COMPLETE PATHNAME for each open file on the
  70. server and an associated handle number. SHARE needs enough memory
  71. to store the full pathname of each open file plus eleven bytes
  72. for the handle and overhead. The parameter represents the amount
  73. of space IN BYTES to reserve for this table. You can find a worst
  74. case scenario by writing the pathname (before drive redirection)
  75. of the longest filename in the deepest subdirectory, adding
  76. eleven bytes and multiplying by the number of FILES in your
  77. CONFIG.SYS. For example, my longest pathname is:
  78. "C:\utility\diags\clocks\uscal.dat" and my FILES= in CONFIG.SYS
  79. is 40. The pathname contains 33 characters + 11 = 44. 44 * 40 =
  80. 1760. So at worst case, the /F should read /F:1760. By default /F
  81. starts at 2048, which should be enough for FILES= of 65 or less.
  82. In actual practice, DOS is usually not called upon to maintain
  83. more than fifty files open at once. From this it becomes clear
  84. that the /F parameter can be left alone and that Dataease's
  85. suggestion that "/F:32000" be used is a colossal waste of RAM.
  86. [As it turns out, the /F parameter being set correctly is the
  87. difference between being able to run Dataease on the server or
  88. not.]
  89.  
  90. THE /L PARAMETER:
  91. Ahhh.. This is the more important part, pay attention! Each open
  92. file also requires at least one lock but could have dozens. Each
  93. time an application requests a portion of a file (such as a
  94. record in a database) a lock on only that portion of the file
  95. that contains the desired information is issued. The lock remains
  96. in effect until the application program specifically removes it.
  97. In Dbase and Foxbase [and others], there is a program imposed
  98. restriction of only one lock used in each database file (two get
  99. used really). However, in other programs like FoxPro/LAN and
  100. Dataease, an unlimited number of locks can be issued on each
  101. file. [Well, unlimited is limited to the number of small chunks
  102. that a file can be broken up into.] So with these programs, one
  103. could have ten open databases with say fifty record locks in
  104. each. This means that SHARE would be maintaining 510 locks plus
  105. maybe a dozen or so extra locks for other open support files. WOW
  106. 522 locks!! The /L parameter specifies the maximum number of
  107. locks that can be used and defaults to a paltry sixty. Each lock
  108. requires that seven bytes be reserved in memory. Locks are harder
  109. to predetermine, but since they are cheap it pays to be generous
  110. with them. In a typical LANtastic network, a /L setting of
  111. "/L:500" is usually sufficient for one to ten users, but
  112. "/L:1000" could be used for programs like Dataease that make
  113. frequent use of multiple record locks.
  114.  
  115. Author:   Tom Filliman
  116.           Fillimerica, Incorporated
  117.  
  118.