Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!zaphod.mps.ohio-state.edu!unix.cis.pitt.edu!dsinc!bagate!cbmvax!jesup From: jesup@cbmvax.commodore.com (Randell Jesup) Newsgroups: comp.sys.amiga.programmer Subject: Re: Why Amiga Gurus???? Message-ID: <18749@cbmvax.commodore.com> Date: 9 Feb 91 00:14:56 GMT References: <1469@pdxgate.UUCP> <1991Jan31.035105.14277@usenet.ins.cwru.edu> <156@dogmelb.dog.oz.au> <16264@sdcc6.ucsd.edu> <1010@amix.commodore.com> Reply-To: jesup@cbmvax.commodore.com (Randell Jesup) Organization: Commodore, West Chester, PA Lines: 48 In article <1010@amix.commodore.com> ford@amix.commodore.com (Mike "Ford" Ditto) writes: >If the only thing that kept Unix from crashing was the run-time memory >protection, under Unix you'd see a "Segmentation violation - core >dumped" many times more often than a typical Amiga crashes under >similar usage. Yet, on most Unix systems, you'll hardly ever see a >production program dump core. This is because the programs on Unix >systems actually have fewer bugs. Well, I've seen a LOT of unix programs that make silly assumptions that happen to work ok on the system it was written on: for example the infamous NULL ptr access on BSD Vaxen - this happily returned 0's. On other Unix machines it causes segmentation faults. So Unix programmers aren't immune from these sorts of problems. Other problems that Unix programs are more likely to have are not checking memory allocations (they CAN fail under unix, there is a fixed amount of swap - even GCC doesn't check it's allocations), not testing error paths, making assumptions about the range of virtual addresses assigned to programs (GNU Emacs does this - it uses the high bits of pointers for tags), etc, etc. I'm not saying there aren't ways to avoid these problems, or that most unix programs have them, but far more have them than should (try compiling stuff from the sources groups and you'll hit all of these). >The "crashability" difference isn't due to the memory protection in >the end-user execution environment as much as it's due to the >programmer's testing environment. Unix is very good at detecting >abnormal program behavior, even in ways that would be completely >harmless if left alone. Absolutely. Getting this is one reason we wrote Enforcer for amigados. We also have something not yet released called angel that catches freelist reads/writes as well, though it REALLY drags your system down. AmigaDos is not likely to get process protection anytime soon; the basic design clashes with per-process protection, and it would be a compatibility nightmare. >Therefore, I think that having a protected-memory environment during >development and testing, even without full resource tracking and >process separation, can recover much this reliability difference >between AmigaDOS and Unix. But only to the extent that developers use >it. -- Randell Jesup, Keeper of AmigaDos, Commodore Engineering. {uunet|rutgers}!cbmvax!jesup, jesup@cbmvax.commodore.com BIX: rjesup The compiler runs Like a swift-flowing river I wait in silence. (From "The Zen of Programming") ;-)