Table of Contents
    Home / Definitions / Main Memory
    Computers 4 min read

    Main memory refers to physical memory that is internal to the computer.   More specifically, main memory is a computer’s short-term storage.

    What does main memory do?

    Main memory’s job is to hold data that the CPU needs to access frequently, such as instructions and data currently being processed. Data can be accessed much more quickly than data stored on disk drives or other secondary storage devices. Instructions are read into the CPU by an instruction fetch unit, decoded by an instruction decode unit, and executed by one or more execution units within the CPU.

    Where did the term come from?

    The term was coined by IBM engineer George Scalise in 1956 when he designed RAMAC (Random Access Method of Accounting and Control), the first commercial computer with a hard disk drive. In early computers, all processing took place in the main memory because there was no hard disk drive for long-term storage of programs and data. 

    The word main is used to distinguish it from external mass storage devices such as disk drives. Other terms used to denote this type of memory include RAM and primary storage.

    Today, most personal computers have both a hard disk drive for permanent storage and random access memory (RAM) for temporary information that must be available during program execution.

    Why does a computer need main memory?

    The computer can manipulate only data that is in the main memory. Therefore, every program you execute and every file you access must be copied from a storage device into the main-memory space. The amount of this space on a computer is crucial because it determines how many programs can be executed at one time and how much data can be readily available to a program.

    Because computers often have too little main memory to hold all the data they need, computer engineers invented a technique called swapping, in which portions of data are copied into main memory as they are needed. Swapping occurs when there is no room in memory for needed data. When one portion of data is copied into memory, an equal-sized portion is copied (swapped) out to make room.

    How much memory does a computer need?

    The amount of main memory in a system depends on the type of computer, but it is typically measured in gigabytes (GB) or terabytes (TB). A gigabyte is 1 billion bytes, while a terabyte is 1 trillion bytes. For example, if you have an 8 GB RAM module installed in your PC, then you can store approximately 7.8 GB of data there at any given time. That data includes all open programs and files as well as temporary information created during normal operation, such as network packets and disk cache files.

    Data can be transferred to registers in order to execute programs faster; this process is called caching. Caching occurs when frequently used program code or data is copied from slower secondary storage devices such as hard disk drives into fast primary storage devices such as random access memory (RAM) chips inside RAM modules on motherboards. This allows quick access to often-used information without having to wait for it to be retrieved over a bus connection from slower secondary storage media like hard disks or optical discs.

    Main memory processes data through pipelining

    A pipeline refers to how tasks are performed in stages with each stage performing its own task before passing along work products to subsequent stages until completion of all tasks at which point results can be passed back up through successive stages until they reach their final destination(s). In computing terms, pipelining refers specifically to how processes run on microprocessors where multiple steps must occur sequentially in order for any given step’s output(s) to become input(s) for another step’s operation(s). 


    This article was reviewed and updated in April 2022 by Web Webster.