Mormaniac Mac OS

broken image


'About This Computer' Mac OS 9.1 window showing the memory consumption of each open application and the system software itself.

Historically, the classic Mac OS used a form of memory management that has fallen out of favor in modern systems. Criticism of this approach was one of the key areas addressed by the change to Mac OS X.

The original problem for the engineers of the Macintosh was how to make optimum use of the 128 KB of RAM with which the machine was equipped, on Motorola 68000-based computer hardware that did not support virtual memory.[1] Since at that time the machine could only run one application program at a time, and there was no fixedsecondary storage, the engineers implemented a simple scheme which worked well with those particular constraints. That design choice did not scale well with the development of the machine, creating various difficulties for both programmers and users.

Download Mac Note that the Mac builds of OpenModelica are discontinued after 1.16. An alternative that is fast and works on all recent versions of OSX is installing on a Linux virtual machine; there are pre-built virtual machine images available. From the Apple menu  in the corner of your screen, choose About This Mac. You should see the macOS name, such as macOS Big Sur, followed by its version number. If you need to know the build number as well, click the version number to see it. Which macOS version is the latest?

Mormaniac Mac OS

Fragmentation[edit]

The primary concern of the original engineers appears to have been fragmentation – that is, the repeated allocation and deallocation of memory through pointers leading to many small isolated areas of memory which cannot be used because they are too small, even though the total free memory may be sufficient to satisfy a particular request for memory. To solve this, Apple engineers used the concept of a relocatable handle, a reference to memory which allowed the actual data referred to be moved without invalidating the handle. Apple's scheme was simple – a handle was simply a pointer into a (non-relocatable) table of further pointers, which in turn pointed to the data.[2] If a memory request required compaction of memory, this was done and the table, called the master pointer block, was updated. The machine itself implemented two areas in memory available for this scheme – the system heap (used for the OS), and the application heap.[3] As long as only one application at a time was run, the system worked well. Since the entire application heap was dissolved when the application quit, fragmentation was minimized.

The memory management system had weaknesses; the system heap was not protected from errant applications, as would have been possible if the system architecture had supported memory protection, and this was frequently the cause of system problems and crashes.[4] In addition, the handle-based approach also opened up a source of programming errors, where pointers to data within such relocatable blocks could not be guaranteed to remain valid across calls that might cause memory to move. This was a real problem for almost every system API that existed. Because of the transparency of system-owned data structures at the time, the APIs could do little to solve this. Thus the onus was on the programmer not to create such pointers, or at least manage them very carefully by dereferencing all handles after every such API call. Since many programmers were not generally familiar with this approach, early Mac programs suffered frequently from faults arising from this.[5]

Palm OS and 16-bit Windows use a similar scheme for memory management, but the Palm and Windows versions make programmer error more difficult. For instance, in Mac OS, to convert a handle to a pointer, a program just de-references the handle directly, but if the handle is not locked, the pointer can become invalid quickly. Calls to lock and unlock handles are not balanced; ten calls to HLock are undone by a single call to HUnlock.[6] In Palm OS and Windows, handles are an opaque type and must be de-referenced with MemHandleLock on Palm OS or Global/LocalLock on Windows. When a Palm or Windows application is finished with a handle, it calls MemHandleUnlock or Global/LocalUnlock. Palm OS and Windows keep a lock count for blocks; after three calls to MemHandleLock, a block will only become unlocked after three calls to MemHandleUnlock.

Mormaniac mac os download

Fragmentation[edit]

The primary concern of the original engineers appears to have been fragmentation – that is, the repeated allocation and deallocation of memory through pointers leading to many small isolated areas of memory which cannot be used because they are too small, even though the total free memory may be sufficient to satisfy a particular request for memory. To solve this, Apple engineers used the concept of a relocatable handle, a reference to memory which allowed the actual data referred to be moved without invalidating the handle. Apple's scheme was simple – a handle was simply a pointer into a (non-relocatable) table of further pointers, which in turn pointed to the data.[2] If a memory request required compaction of memory, this was done and the table, called the master pointer block, was updated. The machine itself implemented two areas in memory available for this scheme – the system heap (used for the OS), and the application heap.[3] As long as only one application at a time was run, the system worked well. Since the entire application heap was dissolved when the application quit, fragmentation was minimized.

The memory management system had weaknesses; the system heap was not protected from errant applications, as would have been possible if the system architecture had supported memory protection, and this was frequently the cause of system problems and crashes.[4] In addition, the handle-based approach also opened up a source of programming errors, where pointers to data within such relocatable blocks could not be guaranteed to remain valid across calls that might cause memory to move. This was a real problem for almost every system API that existed. Because of the transparency of system-owned data structures at the time, the APIs could do little to solve this. Thus the onus was on the programmer not to create such pointers, or at least manage them very carefully by dereferencing all handles after every such API call. Since many programmers were not generally familiar with this approach, early Mac programs suffered frequently from faults arising from this.[5]

Palm OS and 16-bit Windows use a similar scheme for memory management, but the Palm and Windows versions make programmer error more difficult. For instance, in Mac OS, to convert a handle to a pointer, a program just de-references the handle directly, but if the handle is not locked, the pointer can become invalid quickly. Calls to lock and unlock handles are not balanced; ten calls to HLock are undone by a single call to HUnlock.[6] In Palm OS and Windows, handles are an opaque type and must be de-referenced with MemHandleLock on Palm OS or Global/LocalLock on Windows. When a Palm or Windows application is finished with a handle, it calls MemHandleUnlock or Global/LocalUnlock. Palm OS and Windows keep a lock count for blocks; after three calls to MemHandleLock, a block will only become unlocked after three calls to MemHandleUnlock.

Addressing the problem of nested locks and unlocks can be straightforward (although tedious) by employing various methods, but these intrude upon the readability of the associated code block and require awareness and discipline on the part of the coder.

Memory leaks and stale references[edit]

Awareness and discipline are also necessary to avoid memory 'leaks' (failure to deallocate within the scope of the allocation) and to avoid references to stale handles after release (which usually resulted in a hard crash—annoying on a single-tasking system, potentially disastrous if other programs are running).

Switcher[edit]

The situation worsened with the advent of Switcher, which was a way for a Mac with 512KB or more of memory to run multiple applications at once.[7] This was a necessary step forward for users, who found the one-app-at-a-time approach very limiting. Because Apple was now committed to its memory management model, as well as compatibility with existing applications, it was forced to adopt a scheme where each application was allocated its own heap from the available RAM.[8]The amount of actual RAM allocated to each heap was set by a value coded into the metadata of each application, set by the programmer. Sometimes this value wasn't enough for particular kinds of work, so the value setting had to be exposed to the user to allow them to tweak the heap size to suit their own requirements. While popular among 'power users', this exposure of a technical implementation detail was against the grain of the Mac user philosophy. Apart from exposing users to esoteric technicalities, it was inefficient, since an application would be made to grab all of its allotted RAM, even if it left most of it subsequently unused. Another application might be memory starved, but would be unable to utilize the free memory 'owned' by another application.[3]

While an application could not beneficially utilize a sister application's heap, it could certainly destroy it, typically by inadvertently writing to a nonsense address. An application accidentally treating a fragment of text or image, or an unassigned location as a pointer could easily overwrite the code or data of other applications or even the OS, leaving 'lurkers' even after the program was exited. Such problems could be extremely difficult to analyze and correct.

Switcher evolved into MultiFinder in System 4.2, which became the Process Manager in System 7, and by then the scheme was long entrenched. Apple made some attempts to work around the obvious limitations – temporary memory was one, where an application could 'borrow' free RAM that lay outside of its heap for short periods, but this was unpopular with programmers so it largely failed to solve the problems. Apple's System 7 Tune-up addon added a 'minimum' memory size and a 'preferred' size—if the preferred amount of memory was not available, the program could launch in the minimum space, possibly with reduced functionality. This was incorporated into the standard OS starting with System 7.1, but still did not address the root problem.[9]

Virtual memory schemes, which made more memory available by paging unused portions of memory to disk, were made available by third-party utilities like Connectix Virtual, and then by Apple in System 7. This increased Macintosh memory capacity at a performance cost, but did not add protected memory or prevent the memory manager's heap compaction that would invalidate some pointers.

32-bit clean[edit]

Originally the Macintosh had 128 kB of RAM, with a limit of 512 kB. This was increased to 4 MB upon the introduction of the Macintosh Plus. These Macintosh computers used the 68000 CPU, a 32-bit processor, but only had 24 physical address lines. The 24 lines allowed the processor to address up to 16 MB of memory (224 bytes), which was seen as a sufficient amount at the time. The RAM limit in the Macintosh design was 4 MB of RAM and 4 MB of ROM, because of the structure of the memory map.[10] This was fixed by changing the memory map with the Macintosh II and the Macintosh Portable, allowing up to 8 MB of RAM.

Because memory was a scarce resource, the authors of the Mac OS decided to take advantage of the unused byte in each address. The original Memory Manager (up until the advent of System 7) placed flags in the high 8 bits of each 32-bit pointer and handle. Each address contained flags such as 'locked', 'purgeable', or 'resource', which were stored in the master pointer table. When used as an actual address, these flags were masked off and ignored by the CPU.[4]

While a good use of very limited RAM space, this design caused problems when Apple introduced the Macintosh II, which used the 32-bit Motorola 68020 CPU. The 68020 had 32 physical address lines which could address up to 4 GB (232 bytes) of memory. The flags that the Memory Manager stored in the high byte of each pointer and handle were significant now, and could lead to addressing errors.

In theory, the architects of the Macintosh system software were free to change the 'flags in the high byte' scheme to avoid this problem, and they did. For example, on the Macintosh IIci and later machines, HLock() and other APIs were rewritten to implement handle locking in a way other than flagging the high bits of handles. But many Macintosh application programmers and a great deal of the Macintosh system software code itself accessed the flags directly rather than using the APIs, such as HLock(), which had been provided to manipulate them. By doing this they rendered their applications incompatible with true 32-bit addressing, and this became known as not being '32-bit clean'.

In order to stop continual system crashes caused by this issue, System 6 and earlier running on a 68020 or a 68030 would force the machine into 24-bit mode, and would only recognize and address the first 8 megabytes of RAM, an obvious flaw in machines whose hardware was wired to accept up to 128 MB RAM – and whose product literature advertised this capability. With System 7, the Mac system software was finally made 32-bit clean, but there were still the problem of dirty ROMs. The problem was that the decision to use 24-bit or 32-bit addressing has to be made very early in the boot process, when the ROM routines initialized the Memory Manager to set up a basic Mac environment where NuBus ROMs and disk drivers are loaded and executed. Older ROMs did not have any 32-bit Memory Manager support and so was not possible to boot into 32-bit mode. Surprisingly, the first solution to this flaw was published by software utility company Connectix, whose 1991 product MODE32 reinitialized the Memory Manager and repeated early parts of the Mac boot process, allowing the system to boot into 32-bit mode and enabling the use of all the RAM in the machine. Apple licensed the software from Connectix later in 1991 and distributed it for free. The Macintosh IIci and later Motorola based Macintosh computers had 32-bit clean ROMs.

It was quite a while before applications were updated to remove all 24-bit dependencies, and System 7 provided a way to switch back to 24-bit mode if application incompatibilities were found.[3] By the time of migration to the PowerPC and System 7.1.2, 32-bit cleanliness was mandatory for creating native applications and even later Motorola 68040 based Macs could not support 24-bit mode.[6][11]

Object orientation[edit]

The rise of object-oriented languages for programming the Mac – first Object Pascal, then later C++ – also caused problems for the memory model adopted. At first, it would seem natural that objects would be implemented via handles, to gain the advantage of being relocatable. These languages, as they were originally designed, used pointers for objects, which would lead to fragmentation issues. A solution, implemented by the THINK (later Symantec) compilers, was to use Handles internally for objects, but use a pointer syntax to access them. This seemed a good idea at first, but soon deep problems emerged, since programmers could not tell whether they were dealing with a relocatable or fixed block, and so had no way to know whether to take on the task of locking objects or not. Needless to say this led to huge numbers of bugs and problems with these early object implementations. Later compilers did not attempt to do this, but used real pointers, often implementing their own memory allocation schemes to work around the Mac OS memory model.

While the Mac OS memory model, with all its inherent problems, remained this way right through to Mac OS 9, due to severe application compatibility constraints, the increasing availability of cheap RAM meant that by and large most users could upgrade their way out of a corner. The memory was not used efficiently, but it was abundant enough that the issue never became critical. This is ironic given that the purpose of the original design was to maximise the use of very limited amounts of memory. Mac OS X finally did away with the whole scheme, implementing a modern sparse virtual memory scheme. A subset of the older memory model APIs still exists for compatibility as part of Carbon, but maps to the modern memory manager (a thread-safe malloc implementation) underneath.[6] Apple recommends that Mac OS X code use malloc and free 'almost exclusively'.[12]

References[edit]

  1. ^Hertzfeld, Andy (September 1983), The Original Macintosh: We're Not Hackers!, retrieved May 10, 2010CS1 maint: discouraged parameter (link)
  2. ^Hertzfeld, Andy (January 1982), The Original Macintosh: Hungarian, archived from the original on June 19, 2010, retrieved May 10, 2010CS1 maint: discouraged parameter (link)
  3. ^ abcmemorymanagement.org (December 15, 2000), Memory management in Mac OS, archived from the original on May 16, 2010, retrieved May 10, 2010CS1 maint: discouraged parameter (link)
  4. ^ abHertzfeld, Andy, The Original Macintosh: Mea Culpa, retrieved May 10, 2010CS1 maint: discouraged parameter (link)
  5. ^Apple Computer (October 1, 1985), Technical Note OV09: Debugging With PurgeMem and CompactMem, retrieved May 10, 2010CS1 maint: discouraged parameter (link)
  6. ^ abcLegacy Memory Manager Reference, Apple Inc., June 27, 2007, retrieved May 10, 2010CS1 maint: discouraged parameter (link)
  7. ^Hertzfeld, Andy (October 1984), The Original Macintosh: Switcher, retrieved May 10, 2010CS1 maint: discouraged parameter (link)
  8. ^Mindfire Solutions (March 6, 2002), Memory Management in Mac OS(PDF), p. 2, retrieved May 10, 2010CS1 maint: discouraged parameter (link)
  9. ^'System 7.1 upgrade guide'(PDF). Archived from the original(PDF) on March 4, 2016. Retrieved May 26, 2015.
  10. ^'memory maps'. Osdata.com. March 28, 2001. Retrieved May 11, 2010.CS1 maint: discouraged parameter (link)
  11. ^Apple Computer (January 1, 1991), Technical Note ME13: Memory Manager Compatibility, retrieved May 10, 2010CS1 maint: discouraged parameter (link)
  12. ^Memory Allocation Recommendations on OS X, Apple Inc, July 12, 2005, retrieved September 22, 2009CS1 maint: discouraged parameter (link)

External links[edit]

  • Macintosh: ROM Size for Various Models, Apple Inc, August 23, 2000, retrieved September 22, 2009CS1 maint: discouraged parameter (link)
Retrieved from 'https://en.wikipedia.org/w/index.php?title=Classic_Mac_OS_memory_management&oldid=1008965847'

Mormaniac Mac Os Update

So, you've decided to download an older version of Mac OS X. There are many reasons that could point you to this radical decision. To begin with, some of your apps may not be working properly (or simply crash) on newer operating systems. Also, you may have noticed your Mac's performance went down right after the last update. Finally, if you want to run a parallel copy of Mac OS X on a virtual machine, you too will need a working installation file of an older Mac OS X. Further down we'll explain where to get one and what problems you may face down the road.

A list of all Mac OS X versions

We'll be repeatedly referring to these Apple OS versions below, so it's good to know the basic macOS timeline.

Cheetah 10.0Puma 10.1Jaguar 10.2
Panther 10.3Tiger 10.4Leopard 10.5
Snow Leopard 10.6Lion 10.7Mountain Lion 10.8
Mavericks 10.9Yosemite 10.10El Capitan 10.11
Sierra 10.12High Sierra 10.13Mojave 10.14
Catalina 10.15

STEP 1. Prepare your Mac for installation

Given your Mac isn't new and is filled with data, you will probably need enough free space on your Mac. This includes not just space for the OS itself but also space for other applications and your user data. One more argument is that the free space on your disk translates into virtual memory so your apps have 'fuel' to operate on. The chart below tells you how much free space is needed.

Note, that it is recommended that you install OS on a clean drive. Next, you will need enough disk space available, for example, to create Recovery Partition. Here are some ideas to free up space on your drive:

  • Uninstall large unused apps
  • Empty Trash Bin and Downloads
  • Locate the biggest files on your computer:

Go to Finder > All My Files > Arrange by size
Then you can move your space hoggers onto an external drive or a cloud storage.
If you aren't comfortable with cleaning the Mac manually, there are some nice automatic 'room cleaners'. Theres always a bigger... mac os. Our favorite is CleanMyMac as it's most simple to use of all. It deletes system junk, old broken apps, and the rest of hidden junk on your drive.

Download CleanMyMac for OS 10.4 - 10.8 (free version)

Mormaniac Mac Os Download

Download CleanMyMac for OS 10.9 (free version)

Download CleanMyMac for OS 10.10 - 10.14 (free version)

STEP 2. Get a copy of Mac OS X download

Normally, it is assumed that updating OS is a one-way road. That's why going back to a past Apple OS version is problematic. The main challenge is to download the OS installation file itself, because your Mac may already be running a newer version. If you succeed in downloading the OS installation, your next step is to create a bootable USB or DVD and then reinstall the OS on your computer.

How to download older Mac OS X versions via the App Store


If you once had purchased an old version of Mac OS X from the App Store, open it and go to the Purchased tab. There you'll find all the installers you can download. However, it doesn't always work that way. The purchased section lists only those operating systems that you had downloaded in the past. But here is the path to check it:

  1. Click the App Store icon.
  2. Click Purchases in the top menu.
  3. Scroll down to find the preferred OS X version.
  4. Click Download.

This method allows you to download Mavericks and Yosemite by logging with your Apple ID — only if you previously downloaded them from the Mac App Store.

Without App Store: Download Mac OS version as Apple Developer

If you are signed with an Apple Developer account, you can get access to products that are no longer listed on the App Store. If you desperately need a lower OS X version build, consider creating a new Developer account among other options. The membership cost is $99/year and provides a bunch of perks unavailable to ordinary users.

Nevertheless, keep in mind that if you visit developer.apple.com/downloads, you can only find 10.3-10.6 OS X operating systems there. Newer versions are not available because starting Mac OS X Snow Leopard 10.7, the App Store has become the only source of updating Apple OS versions.

Purchase an older version of Mac operating system

You can purchase a boxed or email version of past Mac OS X directly from Apple. Both will cost you around $20. For the reason of being rather antiquated, Snow Leopard and earlier Apple versions can only be installed from DVD.

Buy a boxed edition of Snow Leopard 10.6
Get an email copy of Lion 10.7
Get an email copy of Mountain Lion 10.8

The email edition comes with a special download code you can use for the Mac App Store. Note, that to install the Lion or Mountain Lion, your Mac needs to be running Snow Leopard so you can install the newer OS on top of it.

How to get macOS El Capitan download

If you are wondering if you can run El Capitan on an older Mac, rejoice as it's possible too. But before your Mac can run El Capitan it has to be updated to OS X 10.6.8. So, here are main steps you should take: You will type mac os.

1. Install Snow Leopard from install DVD.
2. Update to 10.6.8 using Software Update.
3. Download El Capitan here.

'I can't download an old version of Mac OS X'

If you have a newer Mac, there is no physical option to install Mac OS versions older than your current Mac model. For instance, if your MacBook was released in 2014, don't expect it to run any OS released prior of that time, because older Apple OS versions simply do not include hardware drivers for your Mac.

But as it often happens, workarounds are possible. There is still a chance to download the installation file if you have an access to a Mac (or virtual machine) running that operating system. For example, to get an installer for Lion, you may ask a friend who has Lion-operated Mac or, once again, set up a virtual machine running Lion. Then you will need to prepare an external drive to download the installation file using OS X Utilities.

After you've completed the download, the installer should launch automatically, but you can click Cancel and copy the file you need. Below is the detailed instruction how to do it.

STEP 3. Install older OS X onto an external drive

The following method allows you to download Mac OS X Lion, Mountain Lion, and Mavericks.

  1. Start your Mac holding down Command + R.
  2. Prepare a clean external drive (at least 10 GB of storage).
  3. Within OS X Utilities, choose Reinstall OS X.
  4. Select external drive as a source.
  5. Enter your Apple ID.

Mormaniac Mac Os Catalina

Now the OS should start downloading automatically onto the external drive. After the download is complete, your Mac will prompt you to do a restart, but at this point, you should completely shut it down. Now that the installation file is 'captured' onto your external drive, you can reinstall the OS, this time running the file on your Mac.

  1. Boot your Mac from your standard drive.
  2. Connect the external drive.
  3. Go to external drive > OS X Install Data.

Locate InstallESD.dmg disk image file — this is the file you need to reinstall Lion OS X. The same steps are valid for Mountain Lion and Mavericks.

How to downgrade a Mac running later macOS versions

Mormaniac Mac Os X

If your Mac runs macOS Sierra 10.12 or macOS High Sierra 10.13, it is possible to revert it to the previous system if you are not satisfied with the experience. You can do it either with Time Machine or by creating a bootable USB or external drive.
Instruction to downgrade from macOS Sierra

Instruction to downgrade from macOS High Sierra

Instruction to downgrade from macOS Mojave

Instruction to downgrade from macOS Catalina

Before you do it, the best advice is to back your Mac up so your most important files stay intact. In addition to that, it makes sense to clean up your Mac from old system junk files and application leftovers. The easiest way to do it is to run CleanMyMac X on your machine (download it for free here).

Visit your local Apple Store to download older OS X version

If none of the options to get older OS X worked, pay a visit to nearest local Apple Store. They should have image installations going back to OS Leopard and earlier. You can also ask their assistance to create a bootable USB drive with the installation file. So here you are. We hope this article has helped you to download an old version of Mac OS X. Below are a few more links you may find interesting.





broken image