Article View: comp.sys.powerpc
Article #2257Re: Ask yourself these before you choosing a 32bit OS...
From: Jerry Shekhel
Date: Tue, 19 Sep 1995 23:56
Date: Tue, 19 Sep 1995 23:56
59 lines
3808 bytes
3808 bytes
Kazimir Kylheku (c2a192@ugrad.cs.ubc.ca) wrote: : : That all makes sense; but doesn't it strike you as strange that you have : to jump through all these circles just to have a properly written : Mac program? Under other operating systems, you just generate code : that does what you want. Allocated memory stays at the same logical : address. : That's fine, but as your program executes, internal fragmentation builds up. Eventually you have a process whose data space is huge and full of holes. The Mac approach allows the operating system to compact the heap, collecting all the free space into one large block. This is very efficient memory-wise, but it requires additional CPU activity at runtime and additional effort on the part of the application developer. Internal fragmentation affects all programs regardless of the operating system on which they run. It is especially serious a problem in MacOS however, because the normal method of dealing with it -- expanding the data space -- may not always be possible, due to MacOS's fixed-size memory partitions and (at least initially) its lack of virtual memory support. Nevertheless, Mac-style (and early Windows-style) heap management is generally a good thing which should at least be available on more systems. UNIX systems ignore the problem and let the applications worry about their own heap management. The OS itself provides only rudimentary facilities for expanding the heap. On the other hand, UNIX provides very robust virtual memory capabilities, so most programs can get by using only the unsophisticated heap management of malloc() and related functions. AmigaOS gives you the worst of all worlds. It ignores both internal and external fragmentation problems, and offers no virtual memory. : : What if you don't do things right? With all these added complications, it's : not inconceivable that you accidentally dereference a pointer to a location : that no longer belongs to you and clobber some other program's data. Oops. : The whole system is spammed. : The so-called complications are there for a reason. Just because AmigaOS ignores certain problems doesn't mean they don't exist. : : Nevin Liber keeps claiming that CMT systems are easier for the programmer : because you don't have to mess around with things like semaphores. If : this is true of the Mac, how do you explain all this memory handle : locking business? Your explanation of what has to be done to write : a piece of code properly and then fine-tune it for good performance makes : me cringe. : You sound as if you've never developed a non-trivial application. Fragmentation is a problem that affects programs no matter where they're running, be it MacOS, AmigaOS, UNIX, etc. The fact that Apple provides a way to deal with it in the OS is not a bad thing. -- Jerry J. Shekhel jerry@cybercom.net
Technical Details
Message-ID:
<43nlc8$sll@orion.cybercom.net>Path:
arc1-ca.pugleaf.net!kalypso.cybercom.net!jerryReferences:
<3vh2hc$9dd@falcon.ccs.uwo.ca> <wade-1809952212460001@f182-067.net.wisc.edu> <43mrf6INN602@gambier.ugrad.cs.ubc.ca> <wade-1909951248440001@bucky.famres.wisc.edu> <43n5maINNep0@keats.ugrad.cs.ubc.ca>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!kalypso.cybercom.net!jerry From: jerry@cybercom.net (Jerry Shekhel) Newsgroups: comp.sys.powerpc,comp.os.linux.advocacy,comp.sys.mac.advocacy,comp.os.os2.advocacy,comp.sys.amiga.advocacy,comp.sys.intel,comp.os.ms-windows.advocacy Subject: Re: Ask yourself these before you choosing a 32bit OS... Followup-To: comp.sys.powerpc,comp.os.linux.advocacy,comp.sys.mac.advocacy,comp.os.os2.advocacy,comp.sys.amiga.advocacy,comp.sys.intel,comp.os.ms-windows.advocacy Date: 19 Sep 1995 23:56:56 GMT Organization: Cyber Access Internet Communications, Inc. Message-ID: <43nlc8$sll@orion.cybercom.net> References: <3vh2hc$9dd@falcon.ccs.uwo.ca> <wade-1809952212460001@f182-067.net.wisc.edu> <43mrf6INN602@gambier.ugrad.cs.ubc.ca> <wade-1909951248440001@bucky.famres.wisc.edu> <43n5maINNep0@keats.ugrad.cs.ubc.ca> NNTP-Posting-Host: kalypso.cybercom.net X-Newsreader: TIN [version 1.2 PL2]