什么是页表条目大小? [英] What is page table entry size?

查看:69
本文介绍了什么是页表条目大小?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我找到了这个例子.

考虑一个具有 32 位逻辑地址空间的系统.如果页面在这样的系统中,大小为 4 KB (2^12),那么页表可能由最多 100 万个条目 (2^32/2^12).假如说每个条目由 4 个字节组成,每个进程可能需要多达 4 MB 的物理地址空间用于单独的页表.

Consider a system with a 32-bit logical address space. If the page size in such a system is 4 KB (2^12), then a page table may consist of up to 1 million entries (2^32/2^12). Assuming that each entry consists of 4 bytes, each process may need up to 4 MB of physical address space for the page table alone.

每个条目由 4 个字节组成是什么意思,为什么每个进程可能需要最多 4 MB 的物理地址空间用于页表?

推荐答案

页表是从虚拟地址到物理地址的转换表,操作系统使用它来人为地增加系统中可用的主内存总量.

A page table is a table of conversions from virtual to physical addresses that the OS uses to artificially increase the total amount of main memory available in a system.

物理内存是位于内存 (DRAM) 中地址的实际位,而虚拟内存是操作系统通过告诉它们它的位置来存在"进程的位置,以便执行诸如允许 2^64 位地址空间,尽管 2^34 位是最常用的 RAM.(2^32 位是 4 GB,所以 2^34 是 16 GB.)每个进程的大多数默认页表大小为 4096 kb,但如果进程需要更多进程空间,页表条目的数量可以增加.页表大小最初也可以分配更小或更大的数量或内存,只是 4 kb 通常是大多数进程的最佳大小.

Physical memory is the actual bits located at addresses in memory (DRAM), while virtual memory is where the OS "lies" to processes by telling them where it's at, in order to do things like allow for 2^64 bits of address space, despite the fact that 2^34 bits is the most RAM normally used. (2^32 bits is 4 gigabytes, so 2^34 is 16 gb.) Most default page table sizes are 4096 kb for each process, but the number of page table entries can increase if the process needs more process space. Page table sizes can also initially be allocated smaller or larger amounts or memory, it's just that 4 kb is usually the best size for most processes.

请注意,页表是页条目表.两者可以有不同的大小,但页表大小最常见的是 4096 kb 或 4 mb,并且页表大小会通过添加更多条目来增加.

Note that a page table is a table of page entries. Both can have different sizes, but page table sizes are most commonly 4096 kb or 4 mb and page table size is increased by adding more entries.

这篇关于什么是页表条目大小?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆