Chinaunix首页 | 论坛 | 博客
  • 博客访问: 56368
  • 博文数量: 47
  • 博客积分: 2095
  • 博客等级: 大尉
  • 技术积分: 560
  • 用 户 组: 普通用户
  • 注册时间: 2008-04-01 18:42
文章分类

全部博文(47)

文章存档

2011年(1)

2008年(46)

我的朋友

分类: LINUX

2008-04-05 21:13:08

Paging in Hardware

The paging unit translates linear addresses into physical ones. One key task in the unit is to check the requested access type against the access rights of the linear address. If the memory access is not valid, it generates a Page Fault exception (see Chapter 4 and Chapter 8).

分页部件将线性地址转换为物理地址。它的一个任务是检查访问权限。如果内存访问无效,会产生一个缺页异常。

For the sake of efficiency, linear addresses are grouped in fixed-length intervals called pages; contiguous linear addresses within a page are mapped into contiguous physical addresses. In this way, the kernel can specify the physical address and the access rights of a page instead of those of all the linear addresses included in it. Following the usual convention, we shall use the term "page" to refer both to a set of linear addresses and to the data contained in this group of addresses.

考虑到效率,线性地址空间被分为固定大小的间隔,称为页;一页里连续的线性地址映射到连续的物理地址。这样,内核可以指明一页对应的物理地址和访问权限,而不用指明该页所有线性地址的访问权限。根据惯例,我们使用术语"page"来表示一组线性地址以及这一组线性地址里的数据。

The paging unit thinks of all RAM as partitioned into fixed-length page frames (sometimes referred to as physical pages ). Each page frame contains a page that is, the length of a page frame coincides with that of a page. A page frame is a constituent of main memory, and hence it is a storage area. It is important to distinguish a page from a page frame; the former is just a block of data, which may be stored in any page frame or on disk.

分页部件认为所有的RAM都被分为固定大小的页帧(有时也叫物理页面)。每一个页帧包含一个页,也就是说一个页帧的大小等于一页的大小。页帧组成了主存,因此它是一个存储区域。区分开页和页帧是很重要的,前者仅仅是一个数据块,它可以被存储在任何一个页帧中或者在硬盘上。

The data structures that map linear to physical addresses are called page tables; they are stored in main memory and must be properly initialized by the kernel before enabling the paging unit.

阅读(420) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~