Wednesday, July 27, 2011

How is Virtual Memory Handled in Mac OS X?


Memory, or RAM, is handled differently in Mac OS X than it was in earlier versions of the Mac OS. In earlier versions of the Mac OS, each program had assigned to it an amount of RAM the program could use. Users could turn on Virtual Memory, which uses part of the system's hard drive as extra RAM, if the system needed it.
In contrast, Mac OS X uses a completely different memory management system. All programs can use an almost unlimited amount of memory, which is allocated to the application on an as-needed basis. Mac OS X will generously load as much of a program into RAM as they can, even parts that may not currently be in use. This may inflate the amount of actual RAM being used by the system. When RAM is needed, the system will swap or page out those pieces not needed or not currently in use. It is important to bear this in mind because a casual examination of memory usage with the top command via the Terminal application will reveal large amounts of RAM being used by applications. (The Terminal application allows users to access the UNIX operating system which is the foundation of Mac OS X.) When needed, the system will dynamically allocate additional virtual memory so there is no need for users try to tamper with how the system handles additional memory needs. However, there is no substitute for having additional physical RAM.
Most Macintoshes produced in the past few years have shipped with either 128 or 256 MB of RAM. Although Apple claims that the minimum amount of RAM that's needed to run Mac OS X is 128 MB, users will find having at least 256 MB is necessary to work in a productive way and having 512 MB is preferable.
Starting with Mac OS 10.4 (Tiger) the minimum will be raised to 256 MB of RAM. Most new Macintoshes are shipping with 512 MB of RAM. For systems which have only 256 MB of RAM it is advisable for users to have at least 512 MB of RAM in order to run applications effectively.
Mac OS 10.5 (Leopard) requires at least 512 MB of RAM. Most users will find that a minimum of 1 GB of RAM is desirable. Less than 1 GB means the system will have to do make use of virtual memory which will adversely affect system performance.

No comments:

Post a Comment