What Every Programmer Should Know About Memory

What Every Programmer Should Know About Memory

简介:

随着CPU内核变得更快和更多,大多数程序的限制因素现在是,并将在一段时间内,内存访问。硬件设计人员已经提出了越来越复杂的内存处理和加速技术-例如CPU缓存-但是如果没有程序员的帮助,这些技术将无法以最佳方式工作。不幸的是,大多数程序员都不了解使用计算机的内存子系统或cpu上的缓存的结构和成本。本文档解释了现代商品硬件上使用的内存子系统的结构,说明了开发CPU缓存的原因,它们的工作方式以及程序应如何利用它们来实现最佳性能。本文档主要面向软件开发人员。它没有涉及足够的硬件技术细节,对面向硬件的读者有用。但是在我们进入实用信息之前,必须为开发人员打下很多基础。

英文简介:

As CPU cores become both faster and more numerous, the limiting factor for most programs is now, and will be for some time, memory access. Hardware designers have come up with ever more sophisticated memory handling and acceleration techniques–such as CPU caches–but these cannot work optimally without some help from the programmer. Unfortunately, neither the structure nor the cost of using the memory subsystem of a computer or the caches on CPUs is well understood by most programmers.

This document explains the structure of memory subsystems in use on modern commodity hardware, illustrating why CPU caches were developed, how they work, and what programs should do to achieve optimal performance by utilizing them.

This document is mostly for software developers. It does not go into enough technical details of the hardware to be useful for hardware-oriented readers. But before we can go into the practical information for developers a lot of groundwork must be laid.

书名
What Every Programmer Should Know About Memory
译名
每个程序员都应该知道的关于内存的知识
语言
英语
年份
2007
页数
114页
大小
912.16 kB
下载
pdf iconWhat Every Programmer Should Know About Memory.pdf
密码
65536

最后更新:2025-04-12 23:54:37

←The Java Garbage Collection Mini-Book

→Software Architecture with Spring 5 Fifth Edition