Memory management may not be something that you think a lot about. But if you use a computer, then you should know that memory is an integral part of the machine. Memory exists in several parts of a computer, from the hard drives to the operating system to the applications and programs being used on the computer.
Hardware
Memory management can mean different things. In the case of hardware, memory is the physical components which store data. This could be a computer chip, hard drives and RAM, or random access memory. All of these items are tangible.
Operating System
The operating system’s memory management involves how and where blocks of memory are allocated at any given time. In the case of the operating system, memory is dynamic. Because there is a finite amount, memory must be shifted from one are of the operating system to another, depending on where memory is needed the most at a particular time.
Applications
Applications handle memory in such a way as to ensure that adequate memory is available for the processes within the application. These processes include any structures of data or objects. In an application, memory is both allocated and recycled.
Allocation and Recycling
Allocation occurs when a program requests a memory block. Once the request occurs, the requested block must be allocated from larger data blocks within the operating system. This process is the job of the memory manager, also known as the allocator.
Should the allocated blocks of memory and data no longer be required by an operating system or application, they can be recycled. The recycling of memory allows the blocks to be reused.
Caching
You may have seen the term ‘cache’ used to describe a web site you recently visited. But in fact, the cache is applicable to the memory allocation and recycling processes which occur within a computer. Just as with a web page, the cache’s purpose is to keep those blocks of data that are used most often instantly available when a computer user needs them.
Where computers are concerned, a primary or level 1 cache must be built into the machine. These cache types are very small in size, ranging from two to 64 KB, and are located inside a computer’s CPU (central processing unit).
Further caches exist typically on a computer’s memory card. These ‘level 2’ caches are located near the CPU and directly connected to it. The use of the level 2 cache is controlled by the L2 controller, which is located on the motherboard and appears as a dedicated integrated circuit. Usually, the high-end limit of these level 2 caches can be as much as 2MB.
Caching is an important part of a computer system, and even more so where the purchase of a system is concerned. Some systems which are priced inexpensively will not include a level 2 cache. However, this can affect the performance of a CPU. Many of today’s modern systems have the level 2 cache built directly into the CPU of the machine.
Common Memory Management Issues
Interestingly, poor management practice is often at the root of many common issues with memory management. One common issue is the leakage of memory, which occurs when programs allocate memory, but don’t release it.
External fragmentation is another commonly-experience memory management issue. Caused by poor allocators, external fragmentation occurs when blocks of memory are released and received so poorly that the distribution of adequately-sized memory blocks is no longer possible, despite the availability of spare memory.
A computer has many components, but memory is one of the most crucial. Learning about the different types of memory and how different processes handle it is a good idea for anyone considering the purchase of a new system.
Citations:
- How computer memory works
Guest author Rita Sanches writes on a variety of topics related to technology. She recommends www.highspeed-internet-providers.co as a resource for understanding how the internet operates.