Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!lll-crg!lll-lcc!pyramid!amdahl!amdcad!jimb From: jimb@amdcad.UUCP (Jim Budler) Newsgroups: net.micro.mac Subject: Re: MAC filesystem vs UNIX filesystem Message-ID: <13144@amdcad.UUCP> Date: Thu, 25-Sep-86 11:39:36 EDT Article-I.D.: amdcad.13144 Posted: Thu Sep 25 11:39:36 1986 Date-Received: Fri, 26-Sep-86 00:57:26 EDT References: <8609232036.AA10451@cory.Berkeley.EDU> Reply-To: jimb@amdcad.UUCP (Jim Budler) Organization: AMD, Sunnyvale, California Lines: 79 In article <8609232036.AA10451@cory.Berkeley.EDU> dillon@CORY.BERKELEY.EDU (Matt Dillon) writes: > >>Jim Budler writes: >>I hope you don't think that a Unix file is all physically contiguous. > > Unix files are physically contiguous with the exception that you can, >say, seek to position 11423444, do a write, and 11423444 bytes will actually >NOT be physically allocated... the intermediate data between X and 1142344, >when read, turns out to be zeros. (at least in BSD4.2)... In fact, the >DBM database utilities use this extensively. > I guess this shows the quality of the opposition. A Unix file may be physically located anywhere on a disk. And any block in the disk may be anywhere on the disk. > What I do clarify, and I stated this in my last posting, is that >the nature of the filesystem itself is different (e.g. two forks instead of >a single file), and this has nothing to do with applications that utilize >the filesystem... whether it's for executables, object files, or what not. > > You can draw similarities, but you must realize that you're comparing >two different levels of implimentation. You're comparing the MAC filesystem >implimentation (on the OS level) to one example of a UNIX file structure >(executables), which is on the application level. Yes, the OS expects the >executable to be in a specific format, but it only applies to UNIX executables >that the OS will at some time try to run, not to anything else. > >>I chose the executable because it is a common file type (not >>structure) roughly comparable to the macintosh. I could have chosen > > File structure. If you start calling everything filetypes, then >what will you call *real* filetypes? For instance, /dev/tty is a tty device, Choose your terms as you will, but in one section we were talking about OS file structures, and now you want to use the same word for distinguishing things which are NOT OS file structures. +--------------- Alright, damnit. A file structure on Berkeley Unix is a *logically* and NOT *physically* contiguous stream of bytes. A Mac a file structure is TWO *logically* seperate streams, each seperatelly containing a *logically* and NOT *physically* contiguous stream of bytes. +--------------- I never argued against the contention that the file structures were different. But that is the *only* mandatory OS difference a programmer has to honor. Period. +--------------- I will repeat again. THE ONLY WAY IN WHICH A PROGRAMMER MUST TREAT THE FILE SYSTEMS AS DIFFERENT WHEN WRITING A MAJORITY OF PROGRAMS IS TO ADD A FLAG VALUE INTO HIS OPEN(). You said this was a BOUND. This may be inconvenient, but hardly a bound. In addition, this flag need NOT be added when accessing only the data fork. +--------------- Thus a Unix program ported to a Macintosh may run in a Unix style, under a shell, with no modifications at all. Maybe not. But I can guarantee that it will not succeed or fail just because of the file system. +--------------- Bye. -- Jim Budler Advanced Micro Devices, Inc. (408) 749-5806 Usenet: {ucbvax,decwrl,ihnp4}!amdcad!jimb Compuserve: 72415,1200 Someday I'll learn not to fight with children.