How Computer Memory Works

Although memory is technically any form of electronic storage, it is used most often to identify fast, temporary forms of storage. If a computer's CPU had to constantly access the hard drive to retrieve every piece of data it needs, it would operate very slowly. When the information is kept in memory, the CPU can access it much more quickly.

08/08/2002


Although memory is technically any form of electronic storage, it is used most often to identify fast, temporary forms of storage. If a computer's CPU had to constantly access the hard drive to retrieve every piece of data it needs, it would operate very slowly. When the information is kept in memory, the CPU can access it much more quickly. Most forms of memory are intended to store data temporarily.

The CPU accesses memory according to a distinct hierarchy. Whether it comes from permanent storage (the hard drive) or input (the keyboard), most data goes in random access memory (RAM) first. The CPU then stores pieces of data it will need to access, often in a cache, and maintains certain special instructions in the register.

All of the components in a computer, such as the CPU, the hard drive, and the operating system, work together as a team, and memory is one of the most essential parts of this team. From the moment you turn your computer on until the time you shut it down, your CPU is constantly using memory. The following is a typical scenario:

  • Turn the computer on.

  • The computer loads data from read-only memory (ROM) and performs a power-on self-test (POST) to make sure all the major components are functioning properly. The memory controller checks all of the memory addresses with a quick read/write operation to ensure that there are no errors in the memory chips.

  • The computer loads the basic input/output system (BIOS) from ROM. The BIOS provides basic information about storage devices, boot sequence, security, and configuration.

  • The computer loads the operating system (OS) from the hard drive into the system's RAM. Usually, the critical parts of the operating system are maintained in RAM as long as the computer is on.

  • When you open an application, it is loaded into RAM. To conserve RAM usage, many applications load only the essential parts of the program initially, then load other pieces as needed.

  • After an application is loaded, any files that are opened for use in that application are loaded into RAM.

  • When you save a file and close the application, the file is written to the specified storage device, then it and the application are purged from RAM.

    • Every time something is loaded or opened, it is placed into RAM. This means that it has been put in the computer's temporary storage area so that the CPU can access that information more easily. The CPU requests the data it needs from RAM, processes it and writes new data back to RAM in a continuous cycle.

      In most computers, this shuffling of data between the CPU and RAM happens millions of times every second. If the changed files are not saved to a permanent storage device before being purged, they are lost.

      Cache and registers

      It takes longer for data to get from the memory card to the CPU than it takes for the CPU to actually process the data. Caches are designed to alleviate this bottleneck by making the data used most often by the CPU instantly available. This is accomplished by building a small amount of memory, known as primary or level 1 cache, into the CPU. Level 1 cache is very small, normally ranging between 2 KB and 64 KB.

      The secondary, or level 2 cache, typically resides on a memory card located near the CPU. The level 2 cache has a direct connection to the CPU. A dedicated integrated circuit on the motherboard regulates the use of the level 2 cache by the CPU.

      Depending on the CPU, the size of the level 2 cache ranges from 256 KB to 2 MB. In most systems, data needed by the CPU is accessed from the cache approximately 95% of the time, greatly reducing the overhead needed when the CPU has to wait for data from the main memory.

      The final step in memory is the registers. These are memory cells built into the CPU that contain specific data needed by the CPU — particularly the arithmetic and logic unit (ALU).

      Types of Memory

      Memory can be split into two main categories: volatile and nonvolatile. Volatile memory loses data as soon as the system is turned off; it requires constant power to remain viable. Most types of RAM fall into this category.

      Nonvolatile memory does not lose its data when the system or device is turned off. A number of types of memory fall into this category. The most familiar is ROM, but flash memory storage devices are also forms of nonvolatile memory.



Top Plant
The Top Plant program honors outstanding manufacturing facilities in North America. View the 2017 Top Plant.
Product of the Year
The Product of the Year program recognizes products newly released in the manufacturing industries.
System Integrator of the Year
Each year, a panel of Control Engineering and Plant Engineering editors and industry expert judges select the System Integrator of the Year Award winners in three categories.
May 2018
Electrical standards, robots and Lean manufacturing, and how an aluminum packaging plant is helping community growth.
April 2018
2017 Product of the Year winners, retrofitting a press, IMTS and Hannover Messe preview, natural refrigerants, testing steam traps
March 2018
SCCR, 2018 Maintenance study, and VFDs in a washdown environment.
April 2018
ROVs, rigs, and the real time; wellsite valve manifolds; AI on a chip; analytics use for pipelines
February 2018
Focus on power systems, process safety, electrical and power systems, edge computing in the oil & gas industry
December 2017
Product of the Year winners, Pattern recognition, Engineering analytics, Revitalize older pump installations
Spring 2018
Burners for heat-treating furnaces, CHP, dryers, gas humidification, and more
April 2018
Implementing a DCS, stepper motors, intelligent motion control, remote monitoring of irrigation systems
February 2018
Setting internal automation standards

Annual Salary Survey

Before the calendar turned, 2016 already had the makings of a pivotal year for manufacturing, and for the world.

There were the big events for the year, including the United States as Partner Country at Hannover Messe in April and the 2016 International Manufacturing Technology Show in Chicago in September. There's also the matter of the U.S. presidential elections in November, which promise to shape policy in manufacturing for years to come.

But the year started with global economic turmoil, as a slowdown in Chinese manufacturing triggered a worldwide stock hiccup that sent values plummeting. The continued plunge in world oil prices has resulted in a slowdown in exploration and, by extension, the manufacture of exploration equipment.

Read more: 2015 Salary Survey

The Maintenance and Reliability Coach's blog
Maintenance and reliability tips and best practices from the maintenance and reliability coaches at Allied Reliability Group.
One Voice for Manufacturing
The One Voice for Manufacturing blog reports on federal public policy issues impacting the manufacturing sector. One Voice is a joint effort by the National Tooling and Machining...
The Maintenance and Reliability Professionals Blog
The Society for Maintenance and Reliability Professionals an organization devoted...
Machine Safety
Join this ongoing discussion of machine guarding topics, including solutions assessments, regulatory compliance, gap analysis...
Research Analyst Blog
IMS Research, recently acquired by IHS Inc., is a leading independent supplier of market research and consultancy to the global electronics industry.
Marshall on Maintenance
Maintenance is not optional in manufacturing. It’s a profit center, driving productivity and uptime while reducing overall repair costs.
Lachance on CMMS
The Lachance on CMMS blog is about current maintenance topics. Blogger Paul Lachance is president and chief technology officer for Smartware Group.
Maintenance & Safety
The maintenance journey has been a long, slow trek for most manufacturers and has gone from preventive maintenance to predictive maintenance.
Industrial Analytics
This digital report explains how plant engineers and subject matter experts (SME) need support for time series data and its many challenges.
IIoT: Operations & IT
This digital report will explore several aspects of how IIoT will transform manufacturing in the coming years.
Randy Steele
Maintenance Manager; California Oils Corp.
Matthew J. Woo, PE, RCDD, LEED AP BD+C
Associate, Electrical Engineering; Wood Harbinger
Randy Oliver
Control Systems Engineer; Robert Bosch Corp.
Data Centers: Impacts of Climate and Cooling Technology
This course focuses on climate analysis, appropriateness of cooling system selection, and combining cooling systems.
Safety First: Arc Flash 101
This course will help identify and reveal electrical hazards and identify the solutions to implementing and maintaining a safe work environment.
Critical Power: Hospital Electrical Systems
This course explains how maintaining power and communication systems through emergency power-generation systems is critical.
click me