Memory - (Primary|Main|Internal) Memory

Card Puncher Data Processing

About

Main memory is also known as:

  • Primary storage
  • internal memory (to distinguish from external memory, such as hard drives)

often referred to simply as memory, is the only one directly accessible to the CPU.

It's the first layer of the storage hierarchy.

The CPU continuously reads instructions stored there through the system bus (wiring) and executes them as required.

As shown in the below diagram, there are a few sub-layers of primary storage:

  • the main large-capacity RAM
  • Processor registers are located inside the processor. Each register typically holds a word of data (often 32 or 64 bits). CPU instructions instruct the arithmetic and logic unit (ALU) to perform various calculations or other operations on this data (or with the help of it). Registers are technically among the fastest of all forms of computer data storage.
  • Processor cache is an intermediate stage between ultra-fast registers and much slower main memory. It's introduced solely to increase performance of the computer. Most actively used information in the main memory is just duplicated in the cache memory, which is faster, but of much lesser capacity. On the other hand it is much slower, but much larger than processor registers. Multi-level hierarchical cache setup is also commonly used—primary cache being smallest, fastest and located inside the processor; secondary cache being somewhat larger and slower.

Hierachy Storage

How memory is accessed ?

Logical (Offset, Memory Adress)

Memory can be think as one large array containing bytes (generally one) indexed by address.

Address Value (In Hexadecimal)
1000 92
1001 AB
1002 15
1003 CD

Memory is organized in a computer by something called memory addresses.

When storing and retrieving data, an offset is used to determine the location in which the data is stored. For example a data request would be “retrieve 8 bytes of data starting at offset 8100”. This is similar to saying “give me the fifth binder from the second row” in the real world.

Physical

Memory Bus

Main memory is directly or indirectly connected to the central processing unit via a memory bus. It is actually two buses (not on the diagram):

  • an address bus
  • and a data bus.

The CPU firstly sends a number through an address bus, a number called memory address, that indicates the desired location of data. Then it reads or writes the data itself using the data bus.

Memory management unit (MMU)

Additionally, a memory management unit (MMU) is a small device between CPU and RAM recalculating the actual memory address, for example to provide an abstraction of virtual memory or other tasks.

Documentation / Reference





Discover More
System Metrics
(Operating) System Metrics

This article is the resources Metrics of an OS (Operating System) Meaning that they will report on all physical server functional components (CPUs, disks, busses, ...). The primary metrics are: CPUs...
Card Puncher Data Processing
(Software|Application|System)

This article regroups all cross functionality between application such as connection pool, proxy and so on .. It's more coupled to technology than to a product. From the operating system perspective,...
System Bus
Architecture - Von Neumann

The Von Neumann organization is the most and well known organization (a sort of reference). It implements a instruction cycle (fetch, decode, execute, store) with the following components: the CPU...
Cpu Moore Law Transistor
Bit - Physical Representation and Storage

A binary number can be represented by any sequence of bits (binary digits), which in turn may be represented by any mechanism capable of being in two mutually exclusive states. In a computer, the numeric...
Cpu Moore Law Transistor
CPU - CPU Cache (L1, L2, L3)

A CPU cache is a cache used by the central processing unit of a computer to reduce the average time to access memory. When the processor needs to read from or write to a location in main memory, it first...
Cpu Moore Law Transistor
CPU - Control Unit

The control unit triggers the arithmetic operations in the ALU. How does the control unit know to request an addition or a subtraction? The answer is: it obtains instructions, one at a time, that have...
Cpu Moore Law Transistor
CPU - Word

A word is a fixed-sized piece of data processed as a unit by the processor. The word size is defined in the instruction set architecture. The term word is used for a small group of bits that are handled...
Cpu Moore Law Transistor
Computer - Central processing unit (CPU)

A CPU is just a device name that indicate a device that controls a computer system. A CPU is also known as: a or The fundamental operation of most CPUs, regardless of the physical form they take,...
Card Puncher Data Processing
Computer - Memory (Physical memory)

Memory is synonymous with the term primary storage Technically, memory is not part of the CPU but is the memory that the processor (CPU) addresses on its bus. Memory is a storage device that stores information...
Motherboard Diagram
Computer - Motherboard

The motherboard is a PCB that connect the component of a computer Each CPU needs a compatible motherboard that can host it. Each motherboard is defined by its chipset model that determine the environment...



Share this page:
Follow us:
Task Runner