- a "crash" course -
![]()
NOTES
"RAM" is an acronym for "random access memory". A memory chip contains the programming code or data to which a processing chip needs immediate or imminent access while it is working on a current project. The code is stored and retrieved ("written" and "read") in binary ones and zeroes.
The code stored in RAM is "volatile", meaning it is lost in case of a power failure, system reset, "crash", or restart. RAM is distinguished from other kinds of memory chips which retain their data values without a supply of electrical current. Familiar examples of other kinds of memory would include ROM ("read-only memory"), where large amounts of built-in permanent code are burned into Mac ROM). RAM is also distinguished by its ability to deliver at random any part of its contents very quickly.
RAM is just one of many different storage devices. Others include ROM (above), EPROM (erasable programmable ROM), hard disk, floppy disk and punched card. Historically, electronical memory such as RAM has played a critical part in the "internal storage" needs of computers. Its speed sets absolute limits on the rate at which data can be written and retrieved, so RAM is manufactured to be extensible - we can add on to it in banks of memory chips, and the processor treats it as one large bucket of available storage.
It is important to realize that, to the processor, it makes no difference whether the storage is in RAM, or on hard drive. The only exception is if the processor, system or program is hard-wired to expect the RAM to be available and to contain the expected data. Then, failure to "get" RAM causes us to "fatal", or crash. Computer designers and applications programmers make these distinctions between RAM and external storage based on speed and efficiency considerations. We will leave it up to the reader to draw those clever analogies to all of the in-house and remote storage archiving needs of a modern office workplace.
In practice, RAM is extremely costly, 8 megabytes costing about what a 500MB hard drive costs in 1996. So we use it, whenever possible, where speed is paramount, and more permanent storage can wait.
In fact, modern applications and processor memory managers assume we are not always going to have adequate RAM for a task. Virtual memory simply means that we can write to a data cache on the hard drive when available or allocated memory runs out. Mac and PC users know that when virtual memory has been activated (such as for a really huge Photoshop job), the sky's the limit on how much work we can do, but the pace slows to a comparative crawl.
We have an article elsewhere about partitioning hard drives. RAM is partitioned, or allocated into layers or chunks reserved for different purposes, on startup, by the processor chip and by the "system" running. All of this is done before you are able to begin using the computer. Some computers, like the PC, have more rigid expectations about where available memory will be found, than the Mac, and older programs and applications in particular may have their requirements, which in turn may conflict with what other programs expect to find available. All computer operating systems have some kind of traffic cop, or "memory manager", to help competing programs fight for available resources. No memory manager is bulletproof, so it helps to have some idea of the demands that we make of them, and what reasonably we may expect in return.
On startup, the processor and operating system performs a truly miraculous bit of housekeeping to get ready to open up shop for the user. The program code in ROM (which is always present) "turns on the lights" and looks around to see what devices are connected and available to it, inventories and tests available RAM, and looks around for an "operating system" (such as System 7.5, or Windows 3.1) to install, i.e., partially load into RAM. If it cannot find one, or the operating system load fails for some reason, Mac users see the legendary "Sad Mac" face. PC users are presented with a list of non-negotiable demands. "Happy Mac": normally, you'll see this face (or a Windows flag emblem flying) while the operating system "loads". This really means that core parts of the system (which must always be present) are loading, along with a lot of other parts (in bloated modern systems) which contain coding your machine set-up may never touch. The next generation of systems, such as Copland, will load a core of essential groups, and other groups or modules will load on demand. A lot of other modules load immediately thereafter if you have configured your system to require them. These "drivers" may be needed to recognize and operate CD ROMS, hard drives, printers, sounds, fonts, monitors, colors and patterns, or other external "devices", or they may be other "accessory" programming code modules to manage or modify the look and feel of your computer or the operating system itself.
You want to be aware that while your system requires a certain amount of RAM in which to store certain parts of itself (it is said to "execute" in memory), it also needs considerable amounts of RAM to store not the system program code, but the reserve memory "buffers" needed to store incoming and outgoing data and results. This is sometimes called "working storage".
The space in KB or MB a system or application program occupies on the harddrive bears no necessary relationship to the amount of RAM it is going to require if loaded.
Older systems and applications programs required far less physical memory, or RAM. If you can believe it, memory was then more expensive. Systems and applications were designed to read and write directly to the hard drive or in smaller chunks. They worked quite well, but they had fewer and simpler devices and programs to support.
2. Fonts, Extensions, Control Panels, Drivers, Sounds
a. FONTS. Every system requires a minimum inventory of fonts to "display itself" (directory, errors, instructions, etc.), such as geneva 9 for the Mac. These usually load directly into RAM to be available to the system and the applications which "call" them. It makes no sense to require a read of the hard drive every time a common font (chicago, helvetica, etc.) is called for a display or print job.
If you're fond of the elegant postscript fonts, the Apple and Microsoft extended True Type collections, and specialty fonts such as San Francisco, Nicotine and Cheap Signage Standard, these load into RAM on startup too (if they are placed in the fonts folder, system suitcase or appropriate directory). It is quite possible to add several megabytes to the RAM occupied by your operating system (this is "system bloat"), and this is RAM that will then not be available to your applications until you remove some fonts and reboot.
b. Extensions and Control Panels. Apple used to call these "inits", or initialization devices. You'll see Control Panels referred to as "cdevs". Windows has similar devices, though far less flexibility on loading and unloading. You'll find them all referred to generically as "drivers", whether they drive an external device, or an internal "extension" to the operating system itself, like Quicktime.
Many applications modify or extend functionality of their host operating system with extra extensions and control panels. It is no longer possible to operate Microsoft Office, most Claris applications, or a host of utilities and "helper" programs without these extensions and cdevs.
The proliferation of drivers and inits has peaked with Windows95 and Apple System 7.5. The new release of 7.5.3 reportedly will have over 120 of these, before you start counting the ones added for Microsoft, the CD ROM, Quicktime, Now Utilities, Conflict Catcher, and the mandatory anti-virus utility. Older machines might well not have enough RAM to operate TeachText when all of these have loaded, if they managed to all load at all.
c. Drivers and sounds. You get the idea already, but there's more: device "drivers" for the Stylewriter, Laserwriter, CD ROM, PaperPort (all found in "Chooser") -- all add to your CPU's usefulness, and all add to system bloat. Sounds can add megabytes to your system RAM requirements if you put them where you are supposed to, i.e., inside the system suitcase itself.
Consequences: ranging from torpid to catastrophic, if you try to run them all at once. It's been demonstrated again and again that you can slow down a Power PC to the speed of the original Mac Classic, with enough extras added. But that's a speed question, and we're writing about RAM management.
Let's just say you've just acquired Microsoft Office, and find you haven't enough memory to operate it. (If things are really tight, Office Manager won't load and tells you so -- and you haven't started up any applications yet!).
"About this Macintosh" or Program Manager may tell you you have free memory left, but your system is telling you it has run out of room. This is possible under both Mac and Windows, as the operating system of each will not yet be infinitely flexible about how much more memory it allocates itself just because you bought another program. Each system has "himem" and "lowmem" memory areas reserved exclusively for its own use. These might be a fixed "bandwidth", or a percentage of free available memory, but there are limits.
At this point, you can remove some drivers and inits, buy some more RAM, or just de-install the program.
3. Application memory. We discussed how the system reserves memory for itself for different purposes. Applications, particularly smart ones, do the same thing.
A "program" may be very single-purpose, like a calculator utility, or amazingly complex, like a high-end word processor, C compiler, spreadsheet, or a communications program like ZTerm, America Online or Netscape Navigator.
Mac applications won't run unless a certain "minimum size" of memory is available for their operating needs. Mac users already know that the "Get Info" application window has 3 memory requirements: minimum, suggested and preferred (under System 7.5), and Mac apps allow us to set the preferred size.
We don't know what percentage of allocated memory the program reserves for itself, and what percentage it reserves for expected user demands. But we do know that the program requires a minimum amount just to operate, and more than that as the user places memory demands upon it.
"Tex-Edit", a basic text editor program, operates with a minimum of 293K. Try setting "preferred" to 293K. What happens? On my machine, opening to a New Window works fine. Opening a 32K text file also works fine. Opening "Welcome to Tex-Edit (212K) causes the warning: "Memory is low. Try increasing Tex-Edit's allocation in the Finder". But Tex-Edit is able to open up this large text file anyway.
None of this is really new to us. We know that, at some point, if we keep opening up new windows and new Text-Files, Tex-Edit will balk, or possibly even crash.
Finder dialogs are notorious for being the "straw that broke the camel's back" when it comes to causing an application to run out of memory. But I cannot break Tom Bender's shareware text editor with this technique. "About this Macintosh" shows Tex-Edit has about 93 out of 293K still available, even when I've just loaded his 212K read-me. How can this be?
c. Working storage, buffers, etc.
Intelligent programs like Tom's don't try to load the whole text file at once. You are normally only reading or writing to a small part of it at any time. Microsoft Word operates the same way. They read enough of a "chunk" of the file to keep you happy, anyway, and, if you scroll too fast, they simply read more chunks of the file, disposing of the old contents of memory storage to make room for them.
When you do a global replace ("replace all", or select-all and change font or size, things get more interesting. I have my own Tex-Edit bumped up to 1600K because I occasionally used Tom's program for some very demanding "replace all" operations. This is not a fair comparison, because his excellent Tex-Edit was never intended for this sort of work, but a "replace all" operation requires the ability to both read and write to the file at the same time, which is easiest and fastest when you can get most or all of the document into RAM in a single piece. I can induce a freeze when I try this with Tex-Edit on a very large document, and I now use Microsoft Word instead (which allocates twentyfold and is written for this sort of project).
Don't get bogged down in the details of how programs allocate memory while you use them. Do become aware that they may be asked to place huge, unexpected demands upon your operating system and available RAM, just like the electrical utility company during a major storm.
It is unlikely that applications will conflict with each other, because (particularly in the Mac, which does backgrounding but not true multitasking), only one of them can be the "active" application at one time, and each application tries to "lock on" to a block of memory for its own use.
An application may have to settle for a "relocatable" block of memory, which the System shuffles back and forth according to what is owned or called for by the currently active program.
Extensions are a major source of memory conflict, both because they all load in order at the same time early in startup, and because they all try to share a reserved area of memory in an orderly fashion. One way extensions "work" in modifying system functionality is by putting "hooks" into the system to intercept calls originally intended for another kind of program.
New verb form: to "fatal". Programmers writing extensions and cdev's have to be pretty good at second-guessing what will happen when their code intercepts a system message intended for another piece of code. As we indicated earlier, A call to memory which no longer exists will always guarantee us to "fatal" - generate an error from which we cannot recover (otther than by restarting).
C. Effects of insufficient RAM.
I think we've covered most of this topic directly, or by indirect reference. Plausible consequences include extremely serious speed issues, failure of programs to start or to perform a requested function, and freezes, system "bombs" and other problems which cause us to crash and burn.
Some users adopt a "spartan" philosophy of never adding a bell or a whistle, or turning on a feature, that they don't absolutely need to perform a given task. The threshhold of what must be minimally acceptable to a minimalist is rising all the time. It is no longer possible to operate many of the fastest 68040 and RISC processors without a minimum set of extensions and ennablers, except perhaps for the very bare-bones task of doing a "clean install" of a system or application without any extensions (shift key on startup).
When you look at the hundreds of hours of troubleshooting incurred by profligate RAM-burners like myself, there is much to be said for the minimalist approach. Even if you do not subscribe to it personally, you should be aware that the minimalist operating system behaves fundamentally differently than your own bloated specimen: the minimalist system performs as it was designed to, whereas ours performs like a turbocharged DeSoto towing a flatbed of hay. Right now, my own system weighs in at 7,232 of RAM (over twice its high school weight) -- and I do not even have half of the extras turned on!
1. Restart without inits (Mac): hold down the shift key during restart. If you remember no other keyboard command, this is the one you want. It is the end-all, be-all for testing extension conflicts, "clean" system installs, and absolutely any install requiring use of an installer program. This forces a completely no-"init" load, shutting out even the "always loads first" extensions like RAM doubler and Conflict Catcher.
2. Changing load order. Normally alphabetical: extensions first, control panels afterwards. By putting tildes, spaces and other characters before an extension or control panel's finder name, you can force the inits to load in a different order. This often prevents extension conflicts or masks their obvious effects.
3. Disabling inits. As far back as System 6, we could cause an init to NOT load by pulling it out of the Extensions or Control Panels folder. System extensions must be put in one of those two folders to be ennabled.
Where to put a disabled extension? Create two new folders. Label them anything you like, but by convention we usually call them "Control Panels (Disabled)", and "Extensions (Disabled). Drag inits you are not using, or inits you suspect of being party to a conflict, into its "disabled" folder.
For the changes you have just made to take effect, you must re-start the Mac at this time.
We have been unable to ascertain whether there is a parallel procedure for Windows. If there is one, perhap[s a macro in the DOS shell, it's ugly, and there is no "extensions manager" on the market for Windows users, but such a procedure, however arcane, would be well worth learning.
If you find yourself doing a lot of this on a Mac, or just dislike the lack of organization and guesswork, you're ready for an extensions manager.
Even if you're a "system minimalist", this may be for you. If you're a profligate RAM wastrel (like me), you need to learn to think like a minimalist in order to get away with your bad habits.
The better extensions managers give you all the control we discussed in "ManualControls", at the click of a button or mouse. Better yet, they give you the ability to define and load extension sets at start-up time.
We tend to need to turn extensions and control panels on and off together in groups or sets. This is because certain groups are needed to perform certain functions, for example:
- Advanced printing (Quickdraw GX)
- CD-ROM, PhotoCD, and high-end graphics
- Internet and communications software (MacPPP, modem inits, etc.)
- Word Processing/DTP (particularly Adobe and Microsoft)
- Scanner, fax and other device-driver governed hardware
- Programming, scripting and AppleScript
I have sets defined around various TASKS which generally require only one or two of the above sets:
- working by modem from home (communications software set)
- Desktop publishing (WP and/or CD-ROM and graphics)
- programming
I know of only one extensions manager which affords full use of all of the controls discussed above, and that is Conflict Catcher, by Casady and Greene. It also detects init conflicts and initiates a series of tests, conducted (without cheating) scientifically, to lead you to the culprit or suspects. This feature and the manual alone are well worth the price, but Conflict Catcher III is also an outstanding example of everything a top-notch Macintosh utility should be.
As a challenge to font management, Conflict Catcher now allows display of individual fonts (in addition to everything else it displays). This means one can turn individual fonts on and off, and define font sets. This is an exceptionally useful feature, included in an already exceptionally useful product. Extension Manager was a shareware standby for years, and Apple finally bought it for inclusion in System 7.5. It is solid, reliable, and "free". I do not know if this version supports system 7.0 and earlier, but its predecessors did. The versions I knew did not incorporate conflict isolation.
In a nutshell: Fonts load at startup if they are in the System suitcase or Fonts folder (which they must be, in order to use them). All of these load at once at startup. Primarily for systems with little physical RAM, or big systems where font management becomes important, font managers allow you to load individual fonts or font sets, even though these need not physically reside within the system folder at all.
SUITCASE was the only way to go for years, passing from Salient Software to Fifth Generation to Symantec in a handful of years, where it now endures a quiet existence of benign neglect. Suitcase will also load sounds from "remote" folders, allowing you to turn on and off grounds of sound resources.
Suitcase was always prone to be one of the prime suspects in any extension conflict, and it was also prone to becoming corrupted, so I always used to keep a spare copy around. Back in the days when it was upgraded regularly, you could not upgrade from the original factory installer diskette, but had to upgrade from a copy of the most recent previous update. So I had to keep copies of them around too, and finally stopped using it altogether. The current version of Suitcase is 2.1.4; I dropped off the upgrade path (as far as I know) about two years ago at 2.1.3.
My fonts folder weighs in at 9.9MB in Finder (remember, that's not the amount of RAM used -- heh, usually). With 123 font suitcases in that folder (a suitcase may contain several fonts or sizes), I'd guess one or two meg of my 8 meg of System RAM is allocated to fonts I almost never use. With both ATM (postscript) and TrueType, I'm a prime candidate for a second look at font managers.
TypeTamer is highly recommended by MacWorld magazine (four stars), and allows defining and organizing fonts sets. It claims compatibility with other font managers, such as Suitcase. This might also be true, but I would have to at least question usage of more than one extension simply to control extension-type modules.
Conflict Catcher III: Again, remember, this product also manages fonts (though these must reside in the fonts folder, one can control the load of individual fonts or sets).
The excellent package "SndControl" by Riccardo Ettore was sold to Now Utilities for inclusion in the now-discontinued NowFun in about 1993. Both products allowed you to define specific sounds to specific apple events (empty trash, that sort of thing) -- giving you the ability to use sounds rather than simply double-clicking them when you wanted to hear them. More importantly, they gave us the ability to get the sounds out of the system folder.
Anyone who ever wiped out 2MB of cool sounds in a "clean system install" knows how important this is. More importantly (recite in unison, please!), only the sounds you wish to load at startup are loaded, or you can cause them to play from the hard drive and not load into RAM at all. KABOOM! This was one of the wunderkind of last year's Mac Expo. I believe it's already gone belly-up. I bought it, for, sadly, I couldn't get Ettore's SndControl 2.2.2 to work on my PowerPC, and there is no replacement that I can find. (I later found an invisible SndControl prefs file which had a damaged resource fork; I trashed in, so one day I'll try it again!) KaBoom! came with a huge library of sounds which personally I found childish and often amateurish and of poor quality. KaBoom! kept forgetting its settings and I kept failing to notice it wasn't working at all, so I eventually trashed it.
The old adage: "you can never have enough RAM". There are enough memory guides out there we are not getting into the mechanics at all. If you need more RAM, you've probably known it for a long time. The mail-order catalogs make it easy to find out what kind to buy for your machine, do some competitive price-shipping (not much variation; prices are high and have been since Win95), and save paying state taxes.
Most people do their own RAM installations whether or not it voids the warranty. Most vendors provide detailed step-by-step instructions, or even videos, to facilitate this. I chickened out and paid $50 to have my local Mac retailer do it for me. My eyesight's not what it once was, and I had a "stuck" RAM card and was afraid of breaking the motherboard if I continued, so, for me, it was a cheap investment.
The real question: how much more RAM do I buy, and can I take it with me? Free RAM in and of itself provides no benefit, unless lack of it is causing your machine to go into virtual memory mode in operations you perform frequently.
If your biggest project will be to write a book, and Nisus Writer or Microsoft Word performs acceptably with less weighty projects, you probably don't need more RAM. (Remember our discussion of how a text file can "scroll" through memory).
If your book is going to have illustrations, which you want to open and/or create in Illustrator or Photoshop, copy to the clipboard, and paste into your word processor, you probably need lots of RAM. In round figures, Photoshop is going to want a minimum of 8MB; Word 6.01 wants 3 to 8, and your clipboard alone may need 2MB or more for a really high-quality color image. That's a potential for 20MB of real, physical RAM, worth about $1000 at today's prices.
Let's talk about RAM Doubler.
"The people who know Mac memory management the best". That's from my home page description of Connectix, the up-and-coming San Mateo firm which invented RAM Doubler, and a host of other unique, indispensable memory management products like Speed Doubler, Maxima (RAM disks), and Virtual. Connectix pioneered 32-bit ennabling for older Macs, and sports a line of snappy utilities like CDU and CPU in its stable of popular products.
Obviously, I'm partisan.
RAM Doubler works in at least three ways to effectively "double" your physical RAM. (I have 16MB physical RAM, but "About this Macintosh" shows 32,768K total available memory.) When it comes to describing how RAM Doubler works, let's take a peek at what Connectix says in their home page:
Software Technical Issues
Q: RAM Doubler is just way too good to be true. How does it work?
A: RAM Doubler works in three ways:
- Uses unused memory from other applications not in use
- Compression of least-recently used memory in RAM
- Swapping memory to hard disk
RAM Doubler is an Extension that always exactly double the amount of application memory you have available. Primarily it works by reassigning free memory in application space that has been allocated to open applications but is not currently in use. If you look at the "About this Macintosh" display, it's all the white parts of those bars.
When that's not enough to double memory we look for parts of memory that are actually in use (the "black bars") but contain code that is unlikely to be needed again, eg. code that was used to boot the computer or launch an application already. We compress this part of memory to give us the extra space we need for a full double. Finally, if we would need to compress too much memory in order to double (ie. we would wind up with poor performance) we occasionally park some compressed info on the hard drive using techniques similar to, but much faster than VM. Using hard drive space is not likely to occur if you have 8MB of RAM or greater. The result is a true doubling of application memory, usually with no appreciable effect on performance.
excerpt from Connectix's home page -- http://www.connectix.com/
NOTE: in the Q&A which follows, Connectix again confirms that if your need is for a large chunk of free ram for a single large application (Photoshop), RAM Doubler is not the answer for this scenario (though it will ease your other RAM problems). It works by salvaging unused space spread over several applications. It cannot salvage space from the application which is already using it.
Connectix' thinking is quite revolutionary. Many say Apple should have thought of this first. But they didn't. Now, Microsoft gives it away with Microsoft Office. Every application and utility out there assumes you already own it, or might. It's a de facto standard for memory management. Unless you have RAM to spare, this is an essential utility.
We don't have too much to say about prices right now. They're too high. However, here are some basic considerations to ponder while framing the question of whether, and how much:
- How much real RAM do I have left over after a "full" system load?
- What is my most RAM-intensive task group (C, DTP, Photoshop)?
- How many slots do I have left?
- Do I have to install in pairs? (Power PC - yes)
- How much do I really need?
- When I trade up to a newer machine, can I take my RAM with me?
- Else, can I find a buyer for my surplus RAM if I sell my machine?
The last question may sound stupid. In most sellers' experience, private buyers mentally discount "surplus RAM" down to zero when making an offer. If your 7100 comes with 8MB new, and you have 16MB, they usually don't care what it cost you, or what it'd cost them new. The psychology of the used market means you can expect more from your used RAM from someone who already needs it. You don't want to squash a machine sale because you're seen to be holding out for a fair price on the RAM. Just pull it and sell it to somebody else. Advertise it as an 8, and make sure you demo it that way.
The Connectix memory guide
© Alex Forbes January 26, 1996
E-mail: Write Summitlake.com Alex Forbes