home *** CD-ROM | disk | FTP | other *** search
/ Club Amiga de Montreal - CAM / CAM_CD_1.iso / files / 184.lha / FastDisk_v1.5 / FastDisk.doc < prev    next >
Text File  |  1988-04-28  |  8KB  |  181 lines

  1.                          Fast Disk V1.5
  2.  
  3.                       For AMIGA500/1000/2000
  4.  
  5.                      Written in Aztec C - V3.4a
  6.  
  7.                           Written 1987 by:
  8.                              Torsten Stolpmann
  9.                              Wilhelm-Raabe Strasse. 26
  10.                              6750 Kaiserslautern
  11.  
  12.       English Translation Provided by Stormin' Norman and Mark Dorn
  13.  
  14. What is FastDisk?
  15.  
  16.      FastDisk is a program that optimizes the at times chaotic disk structure
  17. of an Amiga Disk.  Everbody knows how long it can take for a long directory
  18. to be read into memory.  Fast Disk accelerates this process between 3 and 5
  19. times.  Everybody knows the noise the drive makes when trying to read the
  20. Workbench icons.  FastDisk reduces the head movement to a minimun,
  21. accelerates the validation time and the bootprocess, and also accelerates the
  22. load-time of a program up to 50%.
  23.  
  24. What does Fast Disk do?
  25.  
  26.      FastDisk accomplishes the above by copying the disk by sectors, but the
  27. physical position on the destination disk is changed. That is all!  The
  28. destination disk is still a regular AmigaDOS disk, so there are NO problems
  29. with compatibility.
  30.  
  31. How does FastDisk work?
  32.  
  33.      To understand how FastDisk works, you have to understand a little about
  34. how AmigaDOS operates on a regular disk.  More about this, but not sufficient
  35. information, can be found in the AmigaDOS manual.  Here is just the most
  36. important information.  The 1760 blocks on a disk (512 bytes each) are
  37. divided into the following:
  38.  
  39. 1. Bootsector
  40. 2. RootBlock
  41. 3. Directory-blocks
  42. 4. Fileheader-blocks
  43. 5. FileExtension-blocks
  44. 6. DataBlocks
  45.  
  46.      BootSectors are always on sector 0 and 1.  These are on every AmigaDOS
  47. disk and are read while booting up the system.  (Only if the disk is 
  48. bootable.)  Then there will be a program executed.  FastDisk copies these
  49. tracks without any changes. 
  50.  
  51.      The RootBlock (Sector 880) holds the diskname, creation date, etc., and
  52. the Hash chart with 72 entries with pointers for all files/directories that
  53. are located in the Root Directory.  These entries are sorted by the 
  54. Hash-Algorithms.  The file/directory name is used for this.  If it is a 
  55. Directory name, then the pointer points to the DirectoryBlock, which is 
  56. setup similar to the RootBlock.  If it is a File entry then the pointer
  57. points to a FileHeaderBlock.  Not all entries in the chart must be occupied.
  58. That is why a pointer of "0" is interpreted as blank entry.
  59.  
  60.      It is possible that there is more then one entry occupying the same 
  61. place on the Hash chart.  These collisions are solved in a way that chains
  62. the needed headerblocks in a linear list by a certain pointer.
  63.  
  64.      The FileHeaderBlocks again have another chart, also with 72 entries 
  65. with pointers to DataBlocks that belong to the specific file. If a file needs
  66. more than 72 entries, a chain of FileExtensionBlocks is constructed.  These 
  67. again can have 72 entries. 
  68.  
  69.      Also it is important to know that Amiga disk I/O is track oriented. 
  70. That means if the head starts to read a track, it reads all the sectors of
  71. this track automatically and saves it in ram until it has read the whole 
  72. track, and the read/write head leaves the track completely.  This is a 
  73. advantage if the physical positioning of the blocks on the disk can be
  74. intentionally done when copying, like FastDisk does.
  75.  
  76.      These are the possibilities to optimize disk structure:
  77.  
  78. 1. The physical order of the Files/Directories on the disk is written in the
  79. same order as the Hash chart.  Because the DIR command follows the Hash chart
  80. the listing of directories is going to be accelerated.  Validation time is
  81. shortened as well!
  82.  
  83. 2. To place FileHeaderBlocks there are two possibilities:
  84. A) You group all the HeaderBlocks near the RootBlock (which accelerates the
  85. reading of directories).
  86. B) You place all the DataBlocks right behind the HeaderBlocks.  (The
  87. HeaderBlocks are now all over the disk, but loading of files is accelerated.
  88.  
  89.      For Directory headers there are similar possibilities.  For fast
  90. directories it is better to group inside the FileHeaderBlocks.  For faster
  91. loading of files it is better to place Directory headers inside the Root
  92. track.  Usually there is enough room to place all directory headers there.
  93.  
  94.      As you can see, there are advantages and disadvantages to both methods. 
  95. Fo that reason a little of both methods is supported by the program,
  96. depending on what you want, fast directories (Datadisks) or to load a program
  97. faster (Workbench disks).
  98.  
  99.      AmigaDOS works in a strategy that combines both disadvantages described
  100. above.  It tries to place the HeaderBlock and the first DataBlock of the
  101. file behind each other near the RootBlock.  This accelerates the loading of
  102. small files (System-configuration, .info files).
  103.  
  104.      FastDisk places the following files right behind the HeaderBlock:
  105.  
  106.     Startup-Sequence
  107.     System-Configuration
  108.     All files with the .info ending
  109.  
  110. When doesn't FastDisk work?
  111.  
  112.      FastDisk requires 2 disk drives and a lot of chip memory.  When copying
  113. it reads all Header and DirectoryBlocks to ram.  If there isn't sufficient
  114. room, FastDisk will fail!  So, you should give FastDisk as much ram as
  115. possible.  FastDisk tries to save sectors that are needed later to save in
  116. the cache. That means the more ram you give FastDisk, the faster the program
  117. will run!
  118.  
  119.      FastDisk assumes that you always use a standard AmigaDOS disk.  There 
  120. shouldn't be any sections that are not controlled by AmigaDOS.  If there are
  121. such sectors, FastDisk will not copy, excluding the bootsector.  FastDisk
  122. can't copy a disk with a corrupt disk structure.  FastDisk notices these
  123. errors and suggests you run DiskDoctor.
  124.  
  125. How to run FastDisk!
  126.  
  127.      You can use FastDisk from the CLI as well as from Workbench.  If run
  128. from Workbench it opens its own window (a feature of Aztec 3.4a).  An icon
  129. with the necessary tool types entries is included.
  130.  
  131.      Usage: FastDisk [FROM] drive [TO] drive [FASTDIR] [NOFORMAT]
  132.    Default: FastDisk FROM df0: TO df1:
  133.  
  134. FROM and TO are not nessesary, only if you want to reverse the order, i.e.,
  135. from df1: to df0:.  If you add FASTDIR, FastDisk will work so you get fast
  136. directories (the default is faster program loading).  With the NOFORMAT
  137. parameter, FastDisk won't format the destination disk, and also accelerates
  138. the copying process; but this has the disadvantage that if you ever have to
  139. use DiskDoctor, there could be conflicts with older files already on the
  140. disk.  In that case DiskDoctor sometimes even deletes the working files. 
  141. Thus it is usually best to not use the NOFORMAT option, or to use a freshly
  142. formatted disk as the TO disk.
  143.  
  144.      These options are also available via Workbench and the icon's tool types
  145. gadget by selecting INFO from the Workbench menu.  The tool types are:
  146.  
  147. WINDOW= This is the definition of the window that is opened when 
  148.           running the file, and shouldn't be changed
  149.  
  150. FROM= This is the source drive (df0:-df3:)
  151.  
  152. TO= This is the destination drive (df0:-df3:)
  153.  
  154. FASTDIR= On sets it to on, off or anything else shuts it off
  155.  
  156. NOFORMAT= This should be on or off
  157.  
  158. Defaults:  FROM=df0:
  159.            TO=df1:
  160.            FASTDIR=OFF
  161.            NOFORMAT=OFF
  162.  
  163. *****************************************************************************
  164. Addendum to FastDisk.doc                                     August 1988
  165.  
  166.      FastDisk takes approximately 3 minutes to copy a disk. The doc doesn't
  167. tell you, but if you're using FastDisk on a disk with lots of icons, and your
  168. main reason for using it is to speed up the display of those icons, use the
  169. FASTDIR option.  Personally, I couldn't measure much of a difference between
  170. the two modes (specifying FASTDIR on the command line, or not specifying it)
  171. as far as load-time for a large program goes.  Maybe I didn't do it quite
  172. right.  However, doing a DIR of a disk with a lot of files on it is faster
  173. (and a LOT faster than a standard unaltered disk) when FASTDIR is specified.
  174.  
  175.      Also, this isn't mentioned, but it's very important:  After making a
  176. copy with FastDisk, leave the new copy UNwrite-protected the first time you
  177. open it from Workbench.  Whatever version of Workbench you're using will
  178. update its '.info' file.  Then you can write-protect the disk, and from then
  179. on, there's a BIG decrease in the amount of time your new disk takes to
  180. display a window full of icons.  Your disk drive will quiet down a lot too.
  181.