系统架构学习日志1——内存管理、虚拟存储地址的概念

来源:互联网 发布:淘宝服装质检 编辑:程序博客网 时间:2024/05/01 01:27

之前对内存管理理解得不太深刻,直到看了这篇文章 "The working set model for program behavior " by Peter Denning 后,对内存管理有了更深的理解。

memory 以前分 main memory 和 auxillary memory 两种,main memory 比 auxillary memory 的运行速度快,但更昂贵,空间较小,于是系统设计师们就把常用的数据存储在 main memory 里,提供给内核频繁调用。

也就是说,main memory 其实只就是一种缓存(cache)的作用!

Every level of memory is a cache!

深刻理解cache 的概率很重要,因为cache 比较小,不足以放所有的数据,所以就不断更新内存里的页面(page),把旧的、过时的页面置换出去,这就是内存管理的最基本的内涵!


回头再看这本 《Computer Systems A Programmer’s Perspective》P690 讲的内容,终于有种豁然开朗的感觉,原来 virtual memory 是这么一回事!


0 0