Path: utzoo!utgpu!water!watmath!clyde!rutgers!ames!necntc!adelie!infinet!ulowell!page From: page@swan.ulowell.edu (Bob Page) Newsgroups: comp.sys.amiga Subject: Re: Is AmigaDOS sane? Summary: Yup (at least in the ways you ask) Message-ID: <2457@swan.ulowell.edu> Date: 20 Jan 88 05:24:21 GMT References: <30217R38@PSUVM> Reply-To: page@swan.ulowell.edu (Bob Page) Organization: University of Lowell, Computer Science Dept. Lines: 59 R38@PSUVM.BITNET (aka Marc Rifkin) wrote: >First of all, a newly formatted disk does not have even close to '880k', Oh? How much does it have? Let's count: 2 heads * 80 cylinders/head * 11 sectors/cylinder ==> 1760 sectors. 512 useable bytes per sector, plus 16 bytes of sector label area per sector = 528 bytes/sector Which is 528 bytes/sector * 1760 sectors ==> 929280 bytes, or 907.5K. Note that I'm using the standard notation '1K' == 1024 bytes, unlike some unscrupulous disk drive manufacturers who say it's only 1000 bytes [you know who you are]. If we don't count the sector label areas, we have 1760 sectors times 512 bytes ==> 901120 bytes or 880K. >I know there is usually some overhead used by the DOS, but HOW MUCH? Two sectors are reserved for boot block info. We'll throw them out of our calculations right off the top. Down to 879K, or 1758 blocks. One sector is allocated for the root directory block. One sector (on an 880k disk) is allocated for the disk block bitmap. So, on a freshly formatted 880K disk, you'll have 2 blocks allocated, and 1756 (or 878K) free. 'info' tells you this. That's close to 880K. Each file has a file header block - that's another block per file. Each file has a number of data blocks ... 488 bytes can fit in each data block, because there is an overhead of 24 bytes per data block. So, an otherwise empty disk with one 6 'block' (six 512-byte blocks) really will take up 8 blocks .. one for the file header, and seven (488 data bytes in the first six + 144 data bytes in the seventh one). That's an overhead of 33% or so. If your file is bigger than 70272 bytes, you'll need one additional block to hold some more information for the next 70272 bytes, and so on. So a 300,000 byte file would take not 300000/512 = 586 blocks, but 300000/488 = 615 blocks + 1 file header block + 4 'extension' blocks, or 620 blocks total. That's about 5.8% overhead. Of course, if you have a 500-byte file, you have two file blocks + 1 file header = 3 blocks, or 200% overhead. >Also, I have noticed some inconsistencies in block allocation- such as >putting say 600k on a disk and then checking to find close to 100k free. >What is going on here? Those aren't inconsistencies. See above calculations. >is it possible to format a new floppy under this [fast file system] >format and use it from there? No, the floppies already have a file system handler process assigned to them when they come up (it's in kickstart). Of course this is conjecture. ..Bob -- Bob Page, U of Lowell CS Dept. page@swan.ulowell.edu ulowell!page "I don't know such stuff. I just do eyes." -- from 'Blade Runner'