简体   繁体   English

计算页面和页面表的大小

[英]Calculating size of pages and page tables

A physical address is 32 bits and the virtual address is split as 10 bits 'off-set',2 bits 'byte addressability', 20 bits being left for identifying the page. 物理地址是32位,虚拟地址被分为10位“偏移”,2位“字节可寻址性”,还剩下20位用于标识页面。

What size are the pages and the page tables? 页面和页面表的大小是多少?

I believe its: 我相信它:

2^10 = 1024. 2 ^ 10 = 1024。

The ones that are reserved pages are 2^2 = 4 保留页数是2 ^ 2 = 4

I am not sure on how to use the addressbility though... 我不确定如何使用寻址能力...

Thanks again guys :) 再次感谢你们:)

let me tell you: 让我告诉你:

In the architecture that you use, you will use 2 20 pages, and offset will help you identify the word location in a page. 在您使用的体系结构中,您将使用2 20页,而offset将帮助您识别页面中的单词位置。 So page size is 2 10 . 因此页面大小是2 10 What is the 2 bits of addressability? 可寻址性的2位是多少? It is the addressability of bytes in a word => you have 4 bytes in a word and these 2 bits maps to the byte locations in your word. 这是一个单词中字节的可寻址性=>您在一个单词中有4个字节,而这2位映射到您单词中的字节位置。

Addressing mechanism is is similar to looking for a word in the dictionary, first, find the chunk of words with just the 1st letter matching and then keep narrowing down. 寻址机制类似于在字典中查找单词,首先查找仅与第一个字母匹配的单词块,然后继续缩小范围。 Similarly, 1st 20 bits to locate the page , next 10 bits to locate the word the particular page and last 2 bits for the byte in the word. 同样,前20位用于定位页面,后10位用于将单词定位到特定页面,后2位用于单词中的字节。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM