操作系统/分页
考虑页面大小为 2048 字节、总物理内存为 128K 的需求分页系统,有人可以告诉我如何计算物理地址的长度吗?
considering a demand paged system with page size of 2048 bytes and a total physical memory of 128K, can someone tell me how to calculate the length of the physical address.??
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
由于总物理内存为128K,页面大小为2048字节,因此我们可以同时在内存中拥有128*1024/2048 = 64个页面。因此我们需要 log2(64) = 6 位来索引它们。因此物理地址的长度需要为6位。
事实上,它是一个请求调页系统,不会改变物理地址的长度,它只会(可能)使系统使用更少的内存。
Since the total physical memory is 128K and the page size is 2048 bytes, we can have 128*1024/2048 = 64 pages in memory at the same time. Hence we need log2(64) = 6 bits to index them all. Therefor the length of the physical address needs to be 6 bits.
The fact that it's a demand paging system doesn't change the length of the physical address, it will just (probably) make the system use less memory.