home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / INFO / MISC / TNH_PC.ZIP / WATKINS.NL < prev    next >
Encoding:
Text File  |  1987-01-14  |  2.5 KB  |  88 lines

  1. DOS 2.0 Buffers
  2.  
  3.               Don Watkins
  4.     Marin/Sonoma IBM PC Users Group
  5.  
  6. A feature that I initially overlooked
  7. in DOS 2.0, but now find extremely
  8. helpful is the BUFFERS facility in
  9. the CONFIG.SYS file.
  10.  
  11. When DOS is initialized, it sets up
  12. two memory buffers which are used to
  13. store disk data.  These are used for
  14. both reading and writing when the
  15. amount of data is not an exact
  16. multiple of a sector. For example,
  17. when a file is read, DOS reads
  18. the entire sector into one of
  19. its buffers, locates the correct
  20. record in the buffer and then moves
  21. the selected record into the
  22. application's area of memory.  The
  23. buffer area is marked as being
  24. recently used.  On the next request
  25. for a record, DOS looks in the buffer
  26. area before accessing the disk to see
  27. if that record is contained in the
  28. buffer. If it is, the record is
  29. transferred to the application and no
  30. disk access takes place.  Thus, DOS
  31. acts as its own mini-RAM drive.
  32.  
  33. This buffering method becomes more
  34. effective as the number of buffers
  35. increases. As more buffers are
  36. available, the more the likelihood
  37. that the record will be in one of the
  38. buffers - up to a point.  If DOS has
  39. to look in a hundred buffers for a
  40. record, system performance drops
  41. significantly. I've found that for my
  42. use, 16 buffers works best. (I have a
  43. lot of memory on my system and do a
  44. lot of *.* copying.)
  45.  
  46. You will also notice improved
  47. performance in the use of the COPY
  48. command. After increasing my buffers
  49. to 16, I've found that a COPY *.* can
  50. be executed just as fast as a
  51. DISKCOPY.
  52.  
  53. The number of buffers you use will
  54. depend on the amount of memory
  55. available on your machine since each
  56. additional buffer increases the
  57. resident size of DOS by 528 bytes.
  58. Don't be afraid to experiment with
  59. the number of buffers as it can
  60. always be changed.
  61.  
  62. To change the default buffer setting
  63. add BUFFERS=NN, where NN is the
  64. buffer number to your CONFIG.SYS
  65. file. Remember that the CONFIG file
  66. changes take effect only on IPL.
  67.  
  68. If you don't have a CONFIG.SYS file,
  69. create one by:
  70.  
  71. 1.  Entering COPY CON: CONFIG.SYS{CR}
  72.     --  Copy from the keyboard
  73.     (CONsole) a file named
  74.     Config.sys.
  75.  
  76. 2.  Entering BUFFERSnn{CR}  --
  77.     Where nn is the number of buffers
  78.     you wish to use.
  79.  
  80. 3.  Pressing CTRL Z{CR}  --  Place an
  81.     end-of-file mark on the file.
  82.  
  83. The number of buffers will be changed
  84. to your new setting the next time you
  85. IPL. If you want to change the number
  86. of buffers, use any word processor or
  87. text editor.
  88.