Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在操作系统测验中有一个问题:
计算正常页表和倒排页表的大小,假设您有一个 32 位体系结构,具有 4GB 的 RAM 和 4KB 帧。
需要进行哪些计算?
普通页表..
32 位系统... = 2^32
1 页/帧的大小... 4kb = 2^14
1 页表中的条目数 = 2^32/2^14 = 2^18
页表大小 = 1 个条目的大小 * 条目数
假设 1 个条目大小为 4 个字节......因为 32 位构成 4 个字节
所以页面大小= 2^18*2^2=2^20
即 1 MB
我原以为这将是一个通过 Google 轻松解决的问题,但我似乎找不到明确的(甚至是推测的)答案:
使用比较器语句时,隐式转换发生的顺序是什么?
int i = -1; size_t t = 1; bool result = i < t;
这是否等同于:
bool result = i