All Topics  
Memory management

 

   Email Print
   Bookmark   Link






 

Memory management



 
 
Memory management is the act of managing computer memory
Computer memory

Computer memory is usually meant to refer to the semiconductor technology that is used to store information in Electronics devices. Current primary computer memory makes use of integrated circuits consisting of silicon-based transistors....
. In its simpler forms, this involves providing ways to allocate portions of memory to programs at their request, and freeing it for reuse when no longer needed. The management of main memory is critical to the computer system.

Virtual memory
Virtual memory

Virtual memory is a computer system technique which gives an application program the impression that it has contiguous working memory , while in fact it may be physically fragmented and may even overflow on to disk storage....
 systems separate the memory addresses used by a process from actual physical addresses, allowing separation of processes and increasing the effectively available amount of RAM using disk swapping
Virtual memory

Virtual memory is a computer system technique which gives an application program the impression that it has contiguous working memory , while in fact it may be physically fragmented and may even overflow on to disk storage....
.






Discussion
Ask a question about 'Memory management'
Start a new discussion about 'Memory management'
Answer questions from other users
Full Discussion Forum



Encyclopedia


Memory management is the act of managing computer memory
Computer memory

Computer memory is usually meant to refer to the semiconductor technology that is used to store information in Electronics devices. Current primary computer memory makes use of integrated circuits consisting of silicon-based transistors....
. In its simpler forms, this involves providing ways to allocate portions of memory to programs at their request, and freeing it for reuse when no longer needed. The management of main memory is critical to the computer system.

Virtual memory
Virtual memory

Virtual memory is a computer system technique which gives an application program the impression that it has contiguous working memory , while in fact it may be physically fragmented and may even overflow on to disk storage....
 systems separate the memory addresses used by a process from actual physical addresses, allowing separation of processes and increasing the effectively available amount of RAM using disk swapping
Virtual memory

Virtual memory is a computer system technique which gives an application program the impression that it has contiguous working memory , while in fact it may be physically fragmented and may even overflow on to disk storage....
. The quality of the virtual memory manager can have a big impact on overall system performance.

Garbage collection
Garbage collection (computer science)

In computer science, garbage collection is a form of automatic memory management. The garbage collector, or just collector, attempts to reclaim garbage , or memory used by Object that will never be accessed or mutated again by the Application software....
 is the automated allocation, and deallocation of computer memory resources for a program. This is generally implemented at the programming language level and is in opposition to manual memory management
Manual memory management

In computer science, manual memory management refers to the usage of manual instructions by the programmer in order to identify and deallocate unused objects, or garbage ....
, the explicit allocation and deallocation of computer memory resources.

Features


Memory management systems on multi-tasking operating systems
Computer multitasking

In computing, multitasking is a method by which multiple tasks, also known as Computer process, share common processing resources such as a Central processing unit....
 usually deal with the following issues.

Relocation


In systems with virtual memory
Virtual memory

Virtual memory is a computer system technique which gives an application program the impression that it has contiguous working memory , while in fact it may be physically fragmented and may even overflow on to disk storage....
, programs in memory must be able to reside in different parts of the memory at different times. This is because when the program is swapped back into memory after being swapped out for a while it can not always be placed in the same location. Memory management in the operating system should therefore be able to relocate programs in memory and handle memory references in the code of the program so that they always point to the right location in memory.

Protection

Processes should not be able to reference the memory for another process without permission. This is called memory protection
Memory protection

Memory protection is a way to control memory usage on a computer, and is core to virtually every modern operating system. The main purpose of memory protection is to prevent a process running on an operating system from accessing memory beyond that allocated to it....
, and prevents malicious or malfunctioning code in one program from interfering with the operation of other running programs.

Sharing

Even though the memory for different processes is protected from each other, different processes should be able to share information and therefore access the same part of memory.

Logical organization


Programs are often organized in modules. Some of these modules could be shared between different programs, some are read only and some contain data that can be modified. The memory management is responsible for handling this logical organization that is different from the physical linear address space. One way to arrange this organization is segmentation
Segmentation (memory)

In computing, memory segmentation is one of the most common ways to achieve memory protection; another common one is paging. In a computer system using segmentation, an instruction operand that refers to a memory location includes a value that identifies a segment and an offset within that segment....
.

Physical organization


Memory is usually divided into fast primary storage and slow secondary storage. Memory management in the operating system handles moving information between these two levels of memory.

Memory compaction


The technique of relocating all occupied areas of memory to one end of the memory so as to get one large block of free memory space is called compaction.

Memory can be compacted under the following conditions:

  1. As soon as a job terminates.
  2. When a new job cannot be loaded into memory due to fragmentation.
  3. At fixed time intervals.


DOS memory managers


In addition to standard memory management, the 640 KB barrier of MS-DOS
MS-DOS

MS-DOS is an operating system commercialized by Microsoft. It was the most commonly used member of the DOS family of operating systems and was the main operating system for personal computers during the 1980s....
 and compatible systems led to the development of programs known as memory manager
Memory manager

A memory manager is a part of a computer program which accepts requests from the program to allocate and deallocate chunks of computer memory....
s when PC main memories started to be routinely larger than 640 KB in the late 1980s (see conventional memory
Conventional memory

In computing, conventional memory is the first 640 kilobytes of the memory on IBM PC compatible systems....
). These move portions of the operating system outside their normal locations in order to increase the amount of conventional or quasi-conventional memory available to other applications. Examples are EMM386
EMM386

The name EMM386 was used for the expanded memory managers of both Microsoft's MS-DOS and Digital Research's DR-DOS, which created expanded memory using extended memory on Intel 80386 CPUs....
, which was part of the standard installation in DOS's later versions, and QEMM
QEMM

Quarterdeck Expanded Memory Manager , is a memory manager produced by Quarterdeck Office Systems in the late 1980s through late 1990s. It was the most popular memory manager for the MS-DOS and other DOS operating systems....
. These allowed use of memory above the 640 KB barrier, where memory was normally reserved for RAMs, and high and upper memory.

See also

  • Dynamic memory allocation
    Dynamic memory allocation

    In computer science, dynamic memory allocation is the allocation of computer storage storage for use in a computer program during the runtime of that program....
  • Garbage collection
    Garbage collection (computer science)

    In computer science, garbage collection is a form of automatic memory management. The garbage collector, or just collector, attempts to reclaim garbage , or memory used by Object that will never be accessed or mutated again by the Application software....
  • Handle
    Reference (computer science)

    In computer science, a reference is an object containing information about how to locate and access the particular data item, as opposed to containing the data itself....
     or reference
    Reference (computer science)

    In computer science, a reference is an object containing information about how to locate and access the particular data item, as opposed to containing the data itself....
  • Page table
    Page table

    A page table is the data structure used by a virtual memory system in a computer operating system to store the mapping between virtual addresses and physical addresses....
  • Paging
    Paging

    In computer operating systems that have their main memory divided into page , paging is a transfer of pages between main memory and an auxiliary store, such as hard disk drive....
  • Demand paging
    Demand paging

    In computer operating systems, demand paging is an application of virtual memory. In a system that uses demand paging, the operating system copies a disk paging into physical memory only if an attempt is made to access it ....
  • Pointer
  • Virtual memory
    Virtual memory

    Virtual memory is a computer system technique which gives an application program the impression that it has contiguous working memory , while in fact it may be physically fragmented and may even overflow on to disk storage....
  • Memory management unit
    Memory management unit

    A memory management unit , sometimes called paged memory management unit , is a computer hardware component responsible for handling accesses to computer memory requested by the central processing unit ....
     (MMU)


External links