昨天CSAPP上的疑问的解答
2013-07-22 19:40
225 查看
昨天CSAPP上的疑问的解答
今天整明白了。
CSAPP英文版第2版,826页,或者中文版第2版546页,有这么一段。关于多级页表的。
"But if we had a 32-bit address space, 4KB pages, and a 4-byte PTE[page table entry, 杨注], then we would need a 4MB page table resident in memory at all time..."
其中"32-bit address space"的意思是 2^32 bytes,而不是2^32 bits,因为内存是按字节而不是按比特寻址的。
根据公式:页表尺寸 = (地址空间 / 页尺寸) * PTE入口大小........公式1
32-bit address space: 2^32 bytes (昨天误作bits)
4KB pages: 4K bytes
a 4-byte: 4 bytes
B: bytes
又
K = 2^10
M = 2^22
代入公式1的右侧,得
(2^32 bytes / 4K bytes) * 4 bytes
= 2^32 * 2^2 / (2^2 * 2^10) bytes
= 2^22 bytes
= 2^2 M bytes
= 4MB
--------------------
博客会手工同步到以下地址:
[http://giftdotyoung.blogspot.com]
[http://blog.csdn.net/younggift]
今天整明白了。
CSAPP英文版第2版,826页,或者中文版第2版546页,有这么一段。关于多级页表的。
"But if we had a 32-bit address space, 4KB pages, and a 4-byte PTE[page table entry, 杨注], then we would need a 4MB page table resident in memory at all time..."
其中"32-bit address space"的意思是 2^32 bytes,而不是2^32 bits,因为内存是按字节而不是按比特寻址的。
根据公式:页表尺寸 = (地址空间 / 页尺寸) * PTE入口大小........公式1
32-bit address space: 2^32 bytes (昨天误作bits)
4KB pages: 4K bytes
a 4-byte: 4 bytes
B: bytes
又
K = 2^10
M = 2^22
代入公式1的右侧,得
(2^32 bytes / 4K bytes) * 4 bytes
= 2^32 * 2^2 / (2^2 * 2^10) bytes
= 2^22 bytes
= 2^2 M bytes
= 4MB
--------------------
博客会手工同步到以下地址:
[http://giftdotyoung.blogspot.com]
[http://blog.csdn.net/younggift]
相关文章推荐
- 昨天CSAPP上的疑问的解答
- iOS app 疑问解答
- App_Code/StringFormat.cs(字符串操作类)
- 【转载】wp7中从墓碑化中重新激活时如何从app.xaml.cs中直接导航到程序的某个页面
- cloudsim相关疑问与解答
- 昨天写了一个让屏幕保持长亮的app
- (Redundancy)关于服务器冗余的几个疑问,请知道的帮忙解答.
- Mahout--(五)mahout疑问解答
- 信号量深入理解,疑问解答
- Android仿人人客户端(v5.7.1)——有关滑动式左侧菜单实现过程中网友的疑问解答
- JavaScript中圆括号()和方括号[]的特殊用法疑问解答
- CS:APP3e 深入理解计算机系统_3e Y86-64模拟器指南
- Block使用中的一些疑问解答
- 【疑问解答】如何从文件中按照规则读入数字
- JavaScript单线程的疑问与解答
- 解答MySQL字段类型varchar和char最核心的两大疑问
- CS:APP二进制炸弹phase6
- cs app深入理解计算机系统:第五章 优化程序性能 几个优化的java实现
- CS:APP中的tsh示例
- CS:APP二进制炸弹附加篇