paging

If paging is not used, the linear address space of the processor is mapped directly

into the physical address space of processor. The physical address space is defined as
the range of addresses that the processor can generate on its address bus.

 

如果不使用分页机制,处理器的物理地址直接映射成处理器的线性地址空间。这里的物理地址空间指的就

是处理器地址线可以产生的地址序列。(什么要有线性空间 物理空间 逻辑地址 什么的呢 硬件设计兼容问题吧不知道 8086—386没办法)
Because multitasking computing systems commonly define a linear address space
much larger than it is economically feasible to contain all at once in physical memory,
some method of “virtualizing” the linear address space is needed. This virtualization
of the linear address space is handled through the processor’s paging mechanism.

因为多计算任务系统通常定义一个线性空间(。。。。。不会翻译我理解是不是数据总线可以寻址的大小 比实际上的内存大小大的多吧 )所以一些讲线性地址虚拟话的方法就是必须的了(指的是逻辑上的?)那么这种虚拟化线性地址空间就是通过分页机制处理的。

突然想个问题 分段和分页机制是怎么实现的 是不是靠处理器的硬件 ?我感觉肯定需要软件的支持。回头问问。!!!!!!
Paging supports a “virtual memory” environment where a large linear address space
is simulated with a small amount of physical memory (RAM and ROM) and some diskstorage.

 When using paging, each segment is divided into pages (typically 4 KBytes each in size),

which are stored either in physical memory or on the disk. The operating system or

executive maintains a page directory and a set of page tables to keep track of the pages.

 When a program (or task) attempts to access an address location

 

in the linear address space, the processor uses the page directory and page tables to
translate the linear address into a physical address and then performs the requested
operation (read or write) on the memory location.

分页支持 虚拟的内存环境当上面说的比较大的线性地址模拟小的物理内还有一些硬盘存储空间。当使用分页

机制的时候 每个段都被分成了页(通常每个页4千字节)他们存在物理内存或是磁盘上。(每个段分成页

段一定是4千的倍数吗  哦 突然想起来 这个分页 分段 和 处理器的模式 是不是有关系啊???????????)操作系统或是可执行的程序

维护一个页的目录和一组页索引表格当一个程序或任务试图进入一个地址位置。(好像这就是分页机制的软件吧 可能把

然后处理器就会用上面的目录和索引把那个线性地址翻译成物理地址同时执行在内存上的地址位置
If the page being accessed is not currently in physical memory, the processor interrupts
execution of the program (by generating a page-fault exception). The operating
system or executive then reads the page into physical memory from the disk
and continues executing the program.

(看会电视)如果目前页不是在物理内存中存取(有点糊涂不知道怎么回事 好像应该是页不在内存中的意思)。处理器就会中断程序的执行由页默认异常。操作系统会把他加载到内存中 然后执行。


When paging is implemented properly in the operating-system or executive, the
swapping of pages between physical memory and the disk is transparent to the
correct execution of a program. Even programs written for 16-bit IA-32 processors
can be paged (transparently) when they are run in virtual-8086 mode.

当分页生效在操作系统中时,分页们转换在内存和磁盘之间是透明的对于一个程序的执行这句读不懂

你可能感兴趣的:(paging)