The storage that is closely associated with the processor of a computer system and from which the program instruction and data can be directly retrieved and to which the resulting data is written prior to transfer to backing store or output device. In modern machines this is semiconductor memory but in earlier machines core stores and delay lines were used.
The majority of storage activity generated by a processor in the execution of a program is directed at the main memory. In a modern processor, however, there are usually further small high-speed memories interposed between the processor and main memory that holds recently accessed main-memory data for rapid re-access. Each small high-speed memory is known as a cache. The main memory is normally used in conjunction with a backing store with a much larger capacity. See also memory hierarchy.