[2018年最新整理]OS008-Memory
Segmentation Memory Protection段式内存保护 把内存分成几段,每段分别划给一个实体(操作系统代码、进程1、进程2、…) 基址限长寄存器 内存保护的实现机理,如下图所示 课堂作业 P267 8.1 P268 8.9 8.12 Two-Level Table Scheme Two-Level Paging Example A logical address (on 32-bit machine with 4K page size) is divided into: a page number consisting of 20 bits 页号 a page offset consisting of 12 bits 页偏移 Since the page table is paged, the page number is further divided into: a 10-bit page number 页号 a 10-bit page offset 页偏移 Thus, a logical address is as follows:where pi is an index into the outer page table, and p2 is the displacement within the page of the outer page table P1是用来访问外部页表的索引,p2是外部页表的页偏移 page number page offset pi p2 d 10 10 12 Address-Translation Scheme Three-level Paging Scheme Since each level is stored as a separate table in memory, covering a logical address to a physical one may take three memory accesses.(由于每一级都以单独的页表形式存储在内存中,把一个逻辑地址转换为一个物理地址可能要进行3次内存存取页表。) Even though time needed for one memory access is fourfold, caching permits performance to remain reasonable.(尽管每次内存存取的时间要4倍于内存时间,但使用高速缓存就可以使的指令的执行时间还是可以接受的) Linux的分页机制 3级页表 Hashed Page Tables Common in address spaces 32 bits The virtual page number is hashed into a page table. This page table contains a chain of elements hashing to the same location. 逻辑页号被做了一层哈希(因为逻辑页号也比较大) Virtual page numbers are compared in this chain searching for a match. If a match is found, the corresponding physical frame is extracted. Hashed Page Table Inverted Page Table反向页表 One entry for each real page of memory.(一个内存中页的表项。) Entry consists of the virtual address of the page stored in that real memory location, with information about the process that owns that page.(表项包含真正内存地址的页的虚拟地址,它包括拥有这个页的进程的信息。) Decreases memory needed to store each page table, but increases time needed to search the table when a page reference occurs.(减少内存需要储存每个页表,但是当访问一个页时,寻找页表需要增加时间。) Use hash table to limit the search to one — or at most a few — table entries.(使用哈希表来减少搜索。) Inverted Page Table Architec
您可能关注的文档
最近下载
- 国企面试问题及答案-国企面试题目和解答-国企单位面试的题目.docx VIP
- 沈阳工业大学《数据库原理》2025 学年第二学期期末试卷.pdf VIP
- 储能变流器简介及英飞凌IGBT解决方案-TTA2019.pdf VIP
- 房产过户合同8篇.docx VIP
- 大学生心理健康教育 课件全套 总共13章 大学生心理健康与心理咨询 ,心理危机与生命教育等课件.pptx VIP
- 茅台国企面试题目及答案.doc VIP
- X-MINI 杂物梯主板说明书.pdf VIP
- 市政协副主席2025年度民主生活会对照检查材料(五个带头).docx VIP
- 2023年沈阳工业大学计算机科学与技术专业《计算机网络》科目期末试卷B(有答案).docx VIP
- 花式年糕加工机设计【开题报告+文献综述+毕业设计】.Doc VIP
原创力文档

文档评论(0)