home *** CD-ROM | disk | FTP | other *** search
/ PsL Monthly 1995 April / pslmonthlyvol3-4utilitiesapril1995.iso / utils / dos / opsys_ut / share.txt < prev    next >
Text File  |  1990-09-21  |  6KB  |  126 lines

  1.          DOS 4.01 SHARE Service Question
  2.          ===============================
  3.  
  4. I know the purpose of SHARE in multi-user, multi-tasking and
  5. network environments.  But MS-DOS 4.01 seems to feel that SHARE
  6. must be loaded just because a Large-Partition is defined.  It
  7. may be loaded either via the INSTALL command in the CONFIG.SYS
  8. file or as a TSR in the AUTOEXEC.BAT file.  But if you have a
  9. DOS partition over 32 MB's and you don't install SHARE you
  10. generate a DOS  "WARNING....."  message.  DOS even goes so far
  11. that if you have not installed SHARE it will search the root
  12. directory for it and then AUTO-LOAD it !!  Now THAT is a real
  13. first !  Why...
  14.  
  15. I ran without it for months on a 100MB partition with absolutely
  16. no problem.  Then I got afraid of that constant boot-up warning
  17. and put it back in my CONFIG file.  Of course it is a pain at times
  18. because it can interfere with reasonable desired file access-
  19. such as backing up a file that has not been openned with the proper
  20. Shared Read access by the owning TSR program.  Not that you want to
  21. actually back that file up but that it causes an error msg and
  22. requires an operator response to continue.  That's  all fine for
  23. the original intended purpose of SHARE but now what does it do for
  24. partitions over 32 MB that is not needed in <32 MB partitions ?
  25. Anybody know ?
  26.  
  27. Remember it's NOT required to operate with Large Partitions.  I've
  28. run for months without it...  what was I missing ?
  29.                                        -Ric
  30. -----------------------------------
  31.  
  32.  
  33. Well like so many I made the trek to COMDEX a few weeks ago and
  34. gave some effort to finding the answer to this profound question
  35. of life and the need to SHARE.  Microsoft didn't know the answer.
  36. IBM was staffed by a techie who said "I really don't know the
  37. answer to that, I just include it too."  So I insisted and persisted
  38. and made many at the IBM stand feel increasingly squirmy as nobody
  39. knew the answer.  How stupid they must have felt that somebody
  40. was here asking a dumb DOS question when "we" all knew it nolonger
  41. mattered...  that OS/2 was now the Real Thing.
  42.  
  43. THEN one day they gave a freebie day at COMDEX to an original DOS
  44. programmer who worked on DOS 4.01 !  He quietly and completely
  45. explained the answer...  It's VERY interesting.
  46.                               ~~~~
  47.  
  48. If you use "modern" programs all the time, you may have
  49. never run into problems using Large-Partitions (over 32MB)
  50. without SHARE loaded.  But beware...
  51.  
  52. The deal is that the old file FCB's cannot hold pointer
  53. information in it's "reserved fields", on files that are
  54. located on disk locations past 32MB's.  When used in a
  55. Large-Partition environment, FCB's can be okay as long as
  56. the file is physically WITHIN the 32MB range of the partition.
  57. However if part of the file is past the 32MB range, say in
  58. the 38th megabyte area of the partition, the FCB doesn't
  59. chuck-up or give an error, it just rolls the pointer value
  60. over, thru zero, and gives DOS a new garbage value as an
  61. internal disk pointer.  The next disk read gives junk to
  62. your program, the next disk write corrupts your disk.
  63. It's Great Fun.
  64.  
  65. The reason SHARE is the solution is because it was already
  66. doing the required fix for a different reason in small
  67. partitions.  To give file sharing protection in multi-user
  68. environments SHARE would make a copy of a program's FCB in
  69. a new local copy within SHARE and perform the file open from
  70. SHARE's copy of the FCB.  In so doing, it technically owned
  71. the file and could effectively perform traffic-cop duty
  72. regarding multi-access activity on the file.
  73.  
  74. Since old programs using hard coded FCB's had to be given a
  75. way to run in Large-Partitions something had to be done to
  76. the FCB disk pointer problem.  The solution was to copy the
  77. original FCB from within the program to a new "extended" format
  78. of the FCB that would be in control by the operating system.
  79. The extended form of the FCB with larger fields would be able
  80. to support Large-Partitions, and any other extensions in the
  81. future.
  82.  
  83. This FCB copy capability was already in existance in the
  84. current SHARE facility.  SHARE was just upgraded to not just
  85. copy the FCB into it's own area for file access control but to
  86. copy it into an extended FCB format, when applicable, for
  87. Large-Partition access.
  88.  
  89. As nobody knows the internal code of the program's they run
  90. everyday, you can never be positive if a program is using File
  91. Handles via Extended File IO or old FCB's.  (Actually, if you
  92. can specify a path, it's 99.44% likely to be extended file IO
  93. using a File Handle.)  Since the use of FCB's in Large-Partions,
  94. when accessing the disk area past 32 MB will corrupt the poor
  95. user's disk, IBM said:  "this is serious",  and even forced the
  96. bootup process to automatically search for SHARE in the root
  97. directory if it had not been explicitly loaded in the config file.
  98.  
  99. Ahhhh.... and that explains why such "modern" people as myself
  100. who had used only "modern" programs with File Handles (no FCB's)
  101. never had any problems.
  102. Right.  But not completely safe.
  103.  
  104. Just lucky.  The reason SHARE is an ABSOLUTE NECESSITY in systems
  105. using Large-Partitions is this:
  106.  
  107.      My IBM DOS programmer says that even today DOS itself still
  108.      uses some old FCB's internally for some unspecified internal
  109.      disk functions !
  110.  
  111.      God help us, Microsoft sure didn't.
  112.  
  113.      DOS still runs some original DOS 1.1 file access code that
  114.      REQUIRES SHARE in order not to, on some day, wipe out your
  115.      hard disk !!!
  116.  
  117. So if you're getting the SHARE WARNING at bootup friends, stick
  118. it back in your config file, or just put it in the root directory
  119. of you're C drive, and just eat the bytes it takes in memory...
  120. Fact is, we've got no choice.
  121.                                -Ric
  122.  
  123. ------------------------------------------------------------------
  124. Permission granted to distribute in unmodified form.
  125. Copyright (C) 1990 RainTree Computer Systems.
  126.