Skip to content
LogoTechnipages
LogoTechnipages
  • Topics
        • Android
        • Browsers
        • Gaming
        • Hardware
        • Internet
        • iPhone
        • Linux
        • macOS
        • Office
        • Reviews
        • Software
        • Windows
        • Definitions
        • All Recent Posts
  • Product Reviews
  • About

What Is Shared Memory?

Mel HawthorneNovember 19, 2022 Comments (0)
memory slots

Modern computers have a lot of memory. Each CPU has its cache, and each running program gets assigned its portion of system RAM. There are many different ways this memory can be used and assigned. Shared memory is a concept that affects both CPU caches and the use of system RAM in different ways.

Contents

  • 1 Shared Memory in Hardware
  • 2 Shared Caches in Practice
  • 3 Shared Memory in Software
  • 4 Conclusion

Shared Memory in Hardware

Most modern CPUs have three cache tiers, referred to as L1, L2, and L3. L1 is the smallest and fastest cache, while L3 is the largest and slowest. However, all of them are faster than accessing the main memory, making the hit rate critical to performance. Many factors make the L1 cache faster than L3. First of all, L1 memory cells are physically bigger. There are also fewer of them, and they’re located much closer to the CPU core, often within it.

Placing a cache block within the die area of a core comes with extra complexity on multicore CPUs. At this point, you can choose to have a cache in each core or outside of the cores, specifically between them. Each has its benefits and drawbacks.

Placing a cache in a core minimizes access latency, but it also means that each core needs its cache. This means that you may end up with duplicated cache lines in the L1 caches of different cores, reducing cache space efficiency. This is called a local cache, and while it’s great for access time, it’s less efficient in cache space usage and requires extra overhead in terms of cache coherency.

A shared cache is a cache that is available to multiple or all cores in a multicore CPU. A shared cache means multiple cores can access one instance of specific data, limiting wasted space due to duplication. It also means that one core can temporarily claim more than its fair share of the cache space if it needs it, while the other cores do not. It does come at the cost of increased access time.

Shared Caches in Practice

Modern CPUs use both concepts, with each core having a local L1 cache. L3 cache tends to be shared between many cores, though sometimes not all. L2 varies but can be local or shared depending on the specific CPU generation architecture.

Tip: For chiplet CPUs like high-end AMD Ryzen models, caches may be shared between all cores on a chiplet rather than with all cores in the whole CPU. It doesn’t matter how many cores a cache is shared between; even if it’s just two, it is still a shared cache, though it can be worth highlighting that it’s only partially shared.

Note: System RAM can also be shared between multiple physical CPUs on a single motherboard or between nodes in a multi-CPU system.

Shared Memory in Software

In modern computers, the software doesn’t get to address physical memory directly. Instead, it is assigned a virtual address segment, and the computer translates these virtual addresses to the physical addresses as needed. This helps to isolate memory for individual processes, which is helpful for security.

In some cases, it may be desirable to transfer data in memory from one process to another. The most efficient way to do this is to allow the two processes to share memory space. In this way, both processes can read the same data and communicate with each other. This also helps to use system RAM efficiently as the data isn’t duplicated.

Software-shared memory will typically be achieved by keeping one physical copy of the data and mapping access to it via virtual memory for each process that needs access to it.

Conclusion

Shared memory is the concept of having one section of memory accessible by multiple things. This can be implemented in both hardware and software. CPU cache may be shared between multiple processor cores. This is especially the case for higher tiers of CPU cache. The system memory may also be shared between various physical CPUs in a single larger system.

In software, shared memory can allow IPC Inter-Process Communication. One process allocates memory as shared with one or more specific processes. Those other processes can then access that memory location via virtual memory mapping. Shared memory helps ensure efficient use of memory space by avoiding data duplication in a limited space.

Categories: Hardware

Author Mel Hawthorne

You Might Also Like

  • google-meet-couldnt-start-video-call-because-of-an-error

    How to Record a Google Meet Video

    Judy SanhzHardware
  • fix-Tablet-Mode-not-working-Chromebook

    Fix Chromebook Not Going into Tablet Mode

    Madalina DinitaHardware
  • Problem-finalizing-your-subscription-HP-Ink

    HP Ink: There Was a Problem Finalizing Your Subscription

    Madalina DinitaHardware
  • How To Build The Best Work PC For Your Budget

    Mel HawthorneHardware

Leave a Reply

Your email address will not be published. Required fields are marked *

  • fix error code 0x80190001 1

    How to Quickly Fix Error 0x80190001 for Microsoft or Outlook Account Login 

  • fix filecoauth.exe application error

    Fix FileCoAuth.exe Application Error 

  • fix error code 0x80010002 in windows update

    How to Fix 0x80010002 Error in Windows Update 

  • an unexpected error is keeping you from copying files

    How to Fix “An Unexpected Error Is Keeping You From Copying” for Files 

  • fix page fault in nonpaged area bsod

    How to Fix “Page Fault in Nonpaged Area” BSOD 

profile pic

The Experts Behind Technipages

My name is Mitch Bartlett. I've been working in technology for over 20 years in a wide range of tech jobs from Tech Support to Software Testing. I started this site as a technical guide for myself and it has grown into what I hope is a useful reference for all.

Learn More

technipages logo white
linkedin icon

Technipages is part of Guiding Tech Media, a leading digital media publisher focused on helping people figure out technology. Learn more about our mission and team here.

© 2025 Guiding Tech Media All Rights Reserved

  • About Us
  • Contact
  • Terms of Use
  • Privacy Policy

© 2025 Guiding Tech Media All Rights Reserved

Information from your device can be used to personalize your ad experience.
Do not sell my personal information.

Last Updated on November 19, 2022 by Judy Sanhz