Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.milw.wisc.edu!bbn!ulowell!cbmvax!daveh From: daveh@cbmvax.UUCP (Dave Haynie) Newsgroups: comp.sys.amiga Subject: Re: UNIX vs. Amiga speeds Message-ID: <6388@cbmvax.UUCP> Date: 23 Mar 89 22:03:59 GMT References: <6359@cbmvax.UUCP> Organization: Commodore Technology, West Chester, PA Lines: 100 in article <6359@cbmvax.UUCP>, ditto@cbmvax.UUCP (Michael "Ford" Ditto) says: > Summary: Many factors affect performance; > Hmm? Deven and Dave both seem to be saying that Unix requires paging, > which isn't true. Yes, that's true. I know I overstated it, because anyone who's even a bit familiar with UNIX origins knows that early efforts didn't use any form of memory paging. > Unix existed for 10 or 15 years before AT&T released > a paging version. The early versions were "swapping" systems; only an > entire process could be swapped to disk. Paging systems move small pages > of memory to disk when they are not being used. On a paging or swapping > system, it is trivial to configure the system not to use secondary storage > for virtual memory (when all physical memory is in use, attempts to use > more will result in out-of-memory errors). In fact, the very first system designed at Commodore-Amiga, before 68851 MMUs were available, did much the same things. But regardless of whether or not we're actually swapping pages to disk (which, if implemented correctly, all else being equal, looks to me to be always an advantage, never a disadvantage), we always have an MMU context associated with a modern UNIX process. That MMU context makes UNIX processes more expensive than Amiga processes. Depending on the swap granularity, it may not amount to much, but it is additional overhead. >>I'm not at all claiming that it goes considerably slower, just >>slower. > I'm not convinced. Unix has things like demand-loading of executables > and shared libraries with demand-copied shared data segments. These are > things that only help in certain situations, but the same is true of > things like fast context switches or file systems optimized for large > sequential reads. All these factors will sometimes pile up toward one > system, making it faster, and they will sometimes balance out. I'm not > convinced that either Unix or AmigaOS is inherently "faster" overall. There are other areas I didn't touch upon. For instance, all message passing in the Amiga OS is by reference. Under UNIX, far as I know (again, Mike, I openly admit that I'm only somewhat familiar with UNIX, and you are by anyone's measure a true UNIX wizard), most interprocess communication is done by copying, which always more expensive than passing by reference, and unless you can exploit an MMU pseudo-copy, which is basically a pass by reference through an MMU table, it's going to be significantly more expensive. > And of course, all the above factors are subject to change with new > releases of Unix or AmigaDos; hopefully we'll someday see Unix with > superfast context switches and real time response, and AmigaOS with MMU > address translation, shared text&data segments, automatic stack > allocation, read-ahead, and memory protection. That we both agree on. Regardless of the relative speeds, if AmigaOS crashes every time I make a programming mistake (it doesn't, but let's think worst-case here), UNIX will be a faster environment since I loose all that reboot time. >> Also, once you start swapping, obviously, you will go slower. >>It doesn't take that many programs running to start swapping. Care to >>guess how may programs I have running on my Amiga system here (if you >>guessed 35, you'd win the cupie doll). I'm using less than 1.7 >>megabytes of RAM. Shared libraries sure make a difference. > I don't see what that has to do with Unix vs. AmigaDos performance, > aside from the additional memory usage of the Unix OS itself. Well, if you don't have the memory, the difference is speed, and lots of it. Of course, if you don't have the memory on a currently existing AmigaOS system, the difference is between "it works" and "it bombs with an out of memory error". > And if you are only one megabyte short on physical memory, I > claim that the paging is not noticable. I'd really expect that myself, given any decent paging algorithm, just based on the fact that a good portion of any running program isn't going to be running most of the time; maybe not at all. My main complaint is the actual size of the objects. Perhaps not such a big deal in AMIX, I haven't used System V much at all (as a bit of trivia, I used System IV at AT&T one summer, way back, just a bit). But when you start looking at some of the executable sizes for some of the Sun tools that run under their graphics enviromnent, you get a really bad feeling about not using shared libraries. > (Unless you are just plain using far more virtual memory than you have > physical memory, and I think we all agree that once you do that, swap > I/O is a fact of life). And, of course, it lets you do things, however slowly, which would have been impossible without virtual memory. I predict a reasonable form of virtual memory will be available to AmigaOS users who run under A2620 or 68030 systems before the end of the year, possibly much sooner. > -=] Ford [=- -- Dave Haynie "The 32 Bit Guy" Commodore-Amiga "The Crew That Never Rests" {uunet|pyramid|rutgers}!cbmvax!daveh PLINK: D-DAVE H BIX: hazy Amiga -- It's not just a job, it's an obsession