home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / sys / apple2 / 19376 < prev    next >
Encoding:
Internet Message Format  |  1992-08-23  |  5.6 KB

  1. Path: sparky!uunet!cs.utexas.edu!swrinde!elroy.jpl.nasa.gov!nntp-server.caltech.edu!toddpw
  2. From: toddpw@cco.caltech.edu (Todd P. Whitesel)
  3. Newsgroups: comp.sys.apple2
  4. Subject: Re: gs.os.FST?
  5. Message-ID: <1992Aug24.033134.13396@cco.caltech.edu>
  6. Date: 24 Aug 92 03:31:34 GMT
  7. References: <m0mLtqy-0000OHC@crash.cts.com> <1992Aug22.141938.18518@actrix.gen.nz>
  8. Sender: news@cco.caltech.edu
  9. Organization: California Institute of Technology, Pasadena
  10. Lines: 103
  11. Nntp-Posting-Host: punisher
  12.  
  13. David.Empson@bbs.actrix.gen.nz writes:
  14.  
  15. >No, I'm not talking about extending ProDOS.  I'm talking about
  16. >inventing a new file system that borrows most of its ideas from ProDOS
  17. >(mainly so that it is easier to understand).
  18.  
  19. Save yourself some trouble and just rip off the original UNIX filesystem.
  20. It has all the properties you describe. I am NOT kidding.
  21.  
  22. >HFS can do most of the things I mentioned in my original article.
  23. >BUT, if a disk crashes and the directory structure is damaged, I have
  24. >little or no chance of understanding it, due to the complexity of the
  25. >B-Tree mechanism (I can't even find any decent documentation on it).
  26.  
  27. True. You CAN use Mac utilities to fix it, although this is admittedly not
  28. a nice solution.
  29.  
  30. >I also don't like the way HFS alphabetises everything for you.  Not to
  31. >mention its severe lack of speed.
  32.  
  33. Your view of HFS is skewed. Try using HFS on even a SLOW Macintosh, and you
  34. will find that it is just fine. In fact the automatic alphabetization makes
  35. things faster once your filesystem access code is properly optimized. This
  36. has long since been done on the Mac, but on the IIgs the FST is only 1.0 !!
  37. Give them some time, guy!
  38.  
  39. >With a new file system which is conceptually similar to ProDOS, it
  40. >isn't much of a mental leap to understand the disk structure.
  41.  
  42. Oh, so everybody is hand-repairing their damaged disks now? Last I heard even
  43. the unix guys were running an automatic repair utility rather than doing it by
  44. hand. What we need are real disk-repair utilities, not "easy to understand"
  45. file systems -- especially if the "hard to understand" filesystems can be
  46. successfully automated. The Mac has proven that this is possible, and Microsoft
  47. is investing in one with their HPFS (High Performance File System).
  48.  
  49. >What I want is a "super ProDOS" file system that is specially designed
  50. >to be as efficient as possible for GS/OS to deal with (e.g. all
  51. >directory fields 16 bit so that the processor mode doesn't need to be
  52. >changed).
  53.  
  54. You don't have to change the processor mode. You just read it as if it were
  55. 16 bits and then you zero the top byte (takes one instruction -- AND #$00FF).
  56. Actually, most of the fields in a ProDOS directory entry ARE 16 bits already,
  57. and the 65816 can read them directly.
  58.  
  59. >Re Jawaid's comment on using 4-byte block numbers: what do you gain,
  60. >apart from doubling the size of all index blocks and directory fields
  61. >containing block numbers?
  62.  
  63. Actually, if you use a more HFS like structure, you can drastically SHRINK
  64. your index blocks by storing them as lists of contiguous blocks, or "extents"
  65. as the HFS literature calls them. These "extents" can each be read with a
  66. SINGLE GS/OS driver call; with prodos you have to manually analyze the index
  67. block to figure out what the equivalent extents would be -- why would we want
  68. to do this? Because GS/OS drivers can be a lot faster if they know you want
  69. a whole bunch of contiguous blocks and not just one block. The 3.5 driver is
  70. a dramatic example of this.
  71.  
  72. >If an allocation block system is used, the pointers remain 16 bits,
  73. >minimising disk space required for storing the pointers.
  74.  
  75. Actually I prefer the extent system because you save even more disk space
  76. and you don't have to analyze the driver call optimization. HFS uses an
  77. allocation block system with 16 bit pointers, so each extent can be encoded
  78. in a longword. Nowadays, there is no reason not to use 32 bit block numbers
  79. (especially if you are using an extent scheme), and most unix filesystems
  80. store 32 bit block numbers.
  81.  
  82. >If you have a disk bigger than 32 megabytes are you really worried
  83. >about wasting an extra 512 bytes for some files?
  84.  
  85. You might be if your 200 meg disk was constantly running out of space...
  86. Don't laugh, running out of space is a real annoying problem on unix systems
  87. because multiple people are using them, and you occasionally have to bug
  88. everyone to delete extra stuff so you can have enough space to work in.
  89.  
  90. >Are you ever likely to want to put more than 65535 files on a disk?
  91.  
  92. If the disk is big enough, YES! Suppose you have a megaBBS. You want each
  93. message to be a seperate file, say each one is 10K including index block
  94. and directory overhead. How big are 64K 10K files? 640 Megs. What if your
  95. BBS software wants all the messages on the same 1 GIG drive? You hit the
  96. 64K file limit before you fill the drive.
  97.  
  98. >By the way: I like the idea of inodes - lets put real links in this
  99. >file system as well!
  100.  
  101. No argument there, but you can do a bit better than inodes.
  102.  
  103. BTW, here's an idea you might not have thought of -- have the "assign me a
  104. free block to use" logic divide the disk into "tracks", say every 64 blocks
  105. or so. When you need new blocks, allocate directory/inode blocks from the
  106. even tracks and file data blocks from the odd tracks. When you hit the end of
  107. the disk you start coming back down on the other's set of tracks. This system
  108. will naturally tend to pack the directory information toward the front of the
  109. disk and eliminate long seeks to walk the directory structure -- this is a
  110. real problem with prodos. If the "tracks" are large enough (32K or 64K should
  111. be fine) then actual file reads will still block into large enough extents
  112. for the driver to optimize the transfer.
  113.  
  114. Todd Whitesel
  115. toddpw @ tybalt.caltech.edu
  116.