home *** CD-ROM | disk | FTP | other *** search
/ Amiga Developer CD v1.2 / amidev_cd_12.iso / reference / amiga_mail_vol1 / dos / fastfs < prev    next >
Text File  |  1990-01-26  |  6KB  |  110 lines

  1. (c)  Copyright 1989 Commodore-Amiga, Inc.   All rights reserved.
  2. The information contained herein is subject to change without notice, and 
  3. is provided "as is" without warranty of any kind, either expressed or implied.  
  4. The entire risk as to the use of this information is assumed by the user.
  5.  
  6.  
  7.             FAST FILING SYSTEM
  8.  
  9.                            by Steve Beats
  10.  
  11. The Fast Filing System is a new file system provided for use with any hard
  12. disk that you can connect to your Amiga.  The only restriction is that the
  13. hard disk driver must provide the standard set of disk device commands and
  14. present the media in track and sector format. Since Commodore's controller,
  15. the A2090, auto-mounts the default filesystem on the first partition of a
  16. hard disk, it is not possible to use the Fast Filing System here. However,
  17. using a new version of the Mount command, it's possible to make additional
  18. partitions that utilize the Fast Filing System.
  19.  
  20. Fast Filing System is based on the original filesystem provided by AmigaDOS. 
  21. This results in a high level of compatibility that allows application 
  22. programs and the standard DOS commands to function under FFS without any 
  23. changes required. That is where the similarities end.
  24.  
  25. FFS has been completely re-written in assembler and many of the algorithms 
  26. completely revised to provide much faster response for internal processing.
  27. FFS now spends much more time waiting for I/O or DOS packets instead of
  28. spending all its time figuring out what to do.  For a task that runs at a
  29. high priority on a multi-tasking machine this has obvious benefits.
  30.  
  31. Although there have been many minor re-arrangements of the disk format, the
  32. only major incompatibilty with the old filesystem concerns the data blocks.
  33. Under the old system, data blocks consisted of 24 bytes of header information
  34. followed by 488 bytes of user data.  This means the old system has no option
  35. but to read data from the drive one block at a time.  Since most hard drives
  36. use DMA to transfer data from the disk to memory, this is an inefficient
  37. method and does not use the hardware to its full potential.  FFS addresses 
  38. this problem by storing nothing but data in the data blocks.  Wherever 
  39. possible, data blocks are allocated consecutively which means large reads 
  40. and writes can be performed in one operation.  Even though the old filesystem 
  41. uses this allocation technique, most gains were lost because it had to make 
  42. separate I/O requests for each block.  In addition, the old filesystem used 
  43. cache buffers for both data and header blocks, while FFS only caches headers 
  44. and partial data block transfers.  Large reads and writes that are multiples 
  45. of 512 and positioned at an even address are transferred directly to or from
  46. the user buffer.  This is possible because there is no extraneous information
  47. to be stripped from the data.  It is worth noting that a pleasant side
  48. effect of the new data format is a 4.9% increase in the amount of data that
  49. can be stored on a given disk - about an extra 50K per Megabyte of storage.
  50.  
  51. The speed increases are a little difficult to quantify because FFS can read
  52. unfragmented files as fast as the disk can transfer the data and write files
  53. at about 75% of the maximum disk transfer rate.  This compares very favorably
  54. with the old file system which lost percentage transfer speed as the speed
  55. of the disk increased.  Using a Conner 100Mb SCSI drive and the Commodore
  56. A2090 controller, FFS is 12 times faster then the old filing system on both
  57. read and write operations utilizing a 100KB buffer.  ExNext, the DOS function
  58. to scan a directory, is from 5 to 20 times faster, depending on how many 
  59. cache buffers have been allocated and how many of the file headers are
  60. in those cache buffers.  The disk validator is now resident with FFS and does
  61. not need to be loaded off the disk as in the old filesystem.  Validation of
  62. a regular sized hard disk (about 20 Meg) will complete about 40 times faster
  63. and allow accesses to that disk with a performance hit of only 40% as opposed
  64. to around 90% under the old filesystem.
  65.  
  66. To summarize,  FFS is much faster than the old filesystem in all areas. As
  67. the disk transfer speed increases, FFS keeps up and fully utilizes the data
  68. bandwidth of a given controller.  Compatibility with most existing software
  69. has been maintained with the exception of programs such as DiskDoctor 
  70. which assume the old data block format is in effect.  
  71.  
  72.  
  73.  
  74.                 MOUNTING FFS
  75.                 ============
  76.  
  77. Mounting FFS is easy.  All you need to do is prep your drive with a very small 
  78. first partition - I usually use 2 or 3 cylinders.  Reboot the machine once 
  79. prep is complete and then proceed through the following steps which assume 
  80. that you are using an ST506 20 Megabyte drive with the first partition 
  81. occupying cyclinders 2 to 3.  If you are using a different kind of drive you 
  82. will have to adjust the drive parameters to suit.
  83.  
  84.     1. Copy FFS into L:NEWFS
  85.     2. Make sure you have the new MOUNT command in C:
  86.     3. Edit DEVS:MOUNTLIST and add the following entry:
  87.  
  88. FFS:    Device      = hddisk.device
  89.     Unit        = 1
  90.     Flags       = 0
  91.     Surfaces    = 4
  92.     BlocksPerTrack = 17
  93.     Reserved    = 2
  94.     Interleave  = 0
  95.     LowCyl      = 4
  96.     HighCyl     = 612
  97.     Buffers     = 20
  98.     Stacksize   = 1000
  99.     GlobVec     = 1
  100.     FileSystem  = L:NEWFS
  101. #
  102.  
  103.     4. type 'MOUNT FFS:'
  104.     5. type 'FORMAT DRIVE FFS: NAME "FFS IS FANTASTIC"
  105.  
  106. It's as simple as that.  Globvec and filesystem are the extra entries supported
  107. by the new Mount command.  GlobVec=1 specifies that this is not a BCPL process
  108. and therefore does not need to have a special BCPL environment set up when
  109. it is first loaded.
  110.