青青草原综合久久大伊人导航_色综合久久天天综合_日日噜噜夜夜狠狠久久丁香五月_热久久这里只有精品

posts - 297,  comments - 15,  trackbacks - 0

CHAPTER 3 PROTECTED-MODE MEMORY MANAGEMENT

3.1. MEMORY MANAGEMENT OVERVIEW

The memory management facilities of the IA-32 architecture are divided into two parts: segmentation and paging. Segmentation provides a mechanism of isolating individual code, data, and stack modules so that multiple programs (or tasks) can run on the same processor without interfering with one another. Paging provides a mechanism for implementing a conventional demand-paged, virtual-memory system where sections of a program’s execution environment are mapped into physical memory as needed. Paging can also be used to provide isolation between multiple tasks. When operating in protected mode, some form of segmentation must be used. There is no mode bit to disable segmentation. The use of paging, however, is optional.

IA-32架構(gòu)的內(nèi)存管理機(jī)構(gòu)(facilities)可劃分為兩個(gè)部分:分段(segmentation)和分頁(yè)(paging)。分段功能提供了分隔 代碼、數(shù)據(jù)和堆棧的機(jī)制,從而使多個(gè)進(jìn)程運(yùn)行在同一個(gè)CPU物理地址空間內(nèi)而互不影響;分頁(yè)可用來(lái)實(shí)現(xiàn)一種“請(qǐng)求頁(yè)式(demand-paged)”的虛 擬內(nèi)存機(jī)制,從而頁(yè)化程序執(zhí)行環(huán)境,在程序運(yùn)行時(shí)可將所需要的頁(yè)映射到物理內(nèi)存。分頁(yè)機(jī)制也可用作隔離多進(jìn)程任務(wù)。分段功能是CPU保護(hù)模式必須的,沒(méi)有 設(shè)置位可以屏蔽內(nèi)存分段;不過(guò)內(nèi)存分頁(yè)則是可選的。

These two mechanisms (segmentation and paging) can be configured to support simple single-program (or single-task) systems, multitasking systems, or multiple-processor systems that used shared memory.

As shown in Figure 3-1, segmentation provides a mechanism for dividing the processor’s addressable memory space (called the linear address space) into smaller protected address spaces called segments. Segments can be used to hold the code, data, and stack for a program or to hold system data structures (such as a TSS or LDT). If more than one program (or task) is running on a processor, each program can be assigned its own set of segments. The processor then enforces the boundaries between these segments and insures that one program does not interfere with the execution of another program by writing into the other program’s segments.

分段和分頁(yè)機(jī)制被配置成支持單任務(wù)系統(tǒng)、多任務(wù)系統(tǒng)或多處理器系統(tǒng)。

如圖3-1,內(nèi)存分段將CPU的可尋址空間(稱為線性地址空間)劃分更小的受保護(hù)的內(nèi)存段,這些段存放程序的數(shù)據(jù)(代碼、數(shù)據(jù)和堆棧)和系統(tǒng)的數(shù)據(jù)結(jié)構(gòu) (像TSS 或 LDT)。如果處理器運(yùn)行著多個(gè)任務(wù),那么每個(gè)任務(wù)都有一集自己獨(dú)立的內(nèi)存段。

The segmentation mechanism also allows typing of segments so that the operations that may be performed on a particular type of segment can be restricted.

All the segments in a system are contained in the processor’s linear address space. To locate a byte in a particular segment, a logical address (also called a far pointer) must be provided. A logical address consists of a segment selector and an offset. The segment selector is a unique identifier for a segment. Among other things it provides an offset into a descriptor table (such as the global descriptor table, GDT) to a data structure called a segment descriptor. Each segment has a segment descriptor, which specifies the size of the segment, the access rights and privilege level for the segment, the segment type, and the location of the first byte of the segment in the linear address space (called the base address of the segment). The offset part of the logical address is added to the base address for the segment to locate a byte within the segment. The base address plus the offset thus forms a linear address in the processor’s linear address space.

進(jìn)程的各個(gè)段都必須位于CPU的線性空間之內(nèi),進(jìn)程要訪問(wèn)某段的一個(gè)字節(jié),必須給出該字節(jié) 的邏輯地址(也叫遠(yuǎn)指針)。邏輯地址由段選擇子(segment selector )和偏移值組成。段選擇子是段的唯一標(biāo)識(shí),指向一個(gè)叫段描述符的數(shù)據(jù)結(jié)構(gòu);段描述符位于一個(gè)叫描述表之內(nèi)(如全局描述表GDT); 每個(gè)段必須都有相應(yīng)的段描述符,用以指定段大小、訪問(wèn)權(quán)限和段的特權(quán)級(jí)別(privilege level)、段類型和段的首地址在線性地址空間的位置(叫段的基地址)。邏輯地址通過(guò)基地址加上段內(nèi)偏移得到。

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.

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.

如果不用分頁(yè)功能,處理器的[線性地址空間]就會(huì)直接映射到[物理地址空間]。[物理地址空間]的大小就是處理器能通過(guò)地址總線產(chǎn)生的地址范圍。為了直接 使用線性地址空間從而簡(jiǎn)化編程和實(shí)現(xiàn)多進(jìn)程而提高內(nèi)存的利用率,需要實(shí)現(xiàn)某種對(duì)線性地址空間進(jìn)行“虛擬化(virtualizing)”,CPU的分頁(yè)機(jī) 制實(shí)現(xiàn)了這種虛擬化。

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 disk storage. 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. 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.

“虛擬內(nèi)存”就是利用物理內(nèi)存和磁盤來(lái)對(duì)CPU的線性地址進(jìn)行模擬(kemin:高級(jí)語(yǔ)言源碼指定的是符號(hào)地址,是虛的,有了虛擬內(nèi)存即便是用匯編指定一 固定地址也是虛的。問(wèn)題是這些虛存是怎么管理的)。當(dāng)使用分頁(yè)時(shí),進(jìn)程的每個(gè)段都會(huì)被分成大小固定的頁(yè),這些頁(yè)可能在內(nèi)存中,也可能在磁盤。操作系統(tǒng)用了 一張頁(yè)目錄(page directory)和多張頁(yè)表來(lái)管理這些頁(yè)。當(dāng)進(jìn)程試圖訪問(wèn)線性地址空間的某個(gè)位置,處理器會(huì)通過(guò)頁(yè)目錄和頁(yè)表先將線性地址轉(zhuǎn)換成物理地址,然后再訪問(wèn) (讀或?qū)懀╧emin:轉(zhuǎn)換細(xì)節(jié)沒(méi)有講)。如果被訪問(wèn)的頁(yè)當(dāng)前不在內(nèi)存,處理就會(huì)中斷進(jìn)程的運(yùn)行(通過(guò)產(chǎn)生缺頁(yè)異常中斷)(kemin:怎么判斷某頁(yè)不 在內(nèi)存?)。操作系統(tǒng)負(fù)責(zé)從磁盤讀入該頁(yè)并繼續(xù)執(zhí)行該進(jìn)程(kemin:頁(yè)讀入的前前后后沒(méi)有講)。

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.


from:

http://blog.csdn.net/keminlau/archive/2008/10/19/3090337.aspx

posted on 2010-03-25 15:03 chatler 閱讀(575) 評(píng)論(0)  編輯 收藏 引用 所屬分類: OS
<2025年9月>
31123456
78910111213
14151617181920
21222324252627
2829301234
567891011

常用鏈接

留言簿(10)

隨筆分類(307)

隨筆檔案(297)

algorithm

Books_Free_Online

C++

database

Linux

Linux shell

linux socket

misce

  • cloudward
  • 感覺(jué)這個(gè)博客還是不錯(cuò),雖然做的東西和我不大相關(guān),覺(jué)得看看還是有好處的

network

OSS

  • Google Android
  • Android is a software stack for mobile devices that includes an operating system, middleware and key applications. This early look at the Android SDK provides the tools and APIs necessary to begin developing applications on the Android platform using the Java programming language.
  • os161 file list

overall

搜索

  •  

最新評(píng)論

閱讀排行榜

評(píng)論排行榜

青青草原综合久久大伊人导航_色综合久久天天综合_日日噜噜夜夜狠狠久久丁香五月_热久久这里只有精品
  • <ins id="pjuwb"></ins>
    <blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote>
    <noscript id="pjuwb"></noscript>
          <sup id="pjuwb"><pre id="pjuwb"></pre></sup>
            <dd id="pjuwb"></dd>
            <abbr id="pjuwb"></abbr>
            99国产欧美久久久精品| 亚洲精品久久视频| 欧美自拍丝袜亚洲| 亚洲欧美日韩一区二区在线 | 亚洲免费在线精品一区| 亚洲视频在线观看三级| 亚洲免费中文字幕| 久久精品国产99| 麻豆免费精品视频| 亚洲国产一区二区视频| 欧美va亚洲va国产综合| 欧美激情a∨在线视频播放| 欧美国产综合一区二区| 亚洲精品婷婷| 性高湖久久久久久久久| 久久婷婷麻豆| 欧美少妇一区二区| 激情亚洲网站| 国产精品99久久久久久白浆小说| 亚洲综合国产精品| 美女黄网久久| 99精品国产热久久91蜜凸| 亚洲欧美另类综合偷拍| 久久亚洲捆绑美女| 国产精品毛片a∨一区二区三区|国| 国产亚洲一区二区三区| 亚洲三级视频在线观看| 欧美一级黄色网| 亚洲电影成人| 亚洲一区二区三区四区在线观看| 久久精品二区三区| 欧美日韩精品系列| 一区二区在线观看视频| 99热免费精品| 久久久一二三| 99热免费精品在线观看| 久久久久久**毛片大全| 国产精品高潮呻吟久久| 最新亚洲一区| 久久精品一区中文字幕| 亚洲人成在线观看网站高清| 欧美一区日本一区韩国一区| 欧美日韩一区二区三区四区在线观看| 黄色在线成人| 久久精品欧美日韩精品| 日韩视频在线一区| 美腿丝袜亚洲色图| 亚洲大胆在线| 猫咪成人在线观看| 欧美与欧洲交xxxx免费观看| 国产精品国产三级国产专播品爱网 | 一区二区三区久久网| 米奇777超碰欧美日韩亚洲| 国产色爱av资源综合区| 亚洲一区免费观看| 亚洲精品一区二区在线观看| 久久免费视频网| 国产视频在线观看一区二区三区 | 久久久国产精品一区二区三区| 亚洲精品午夜| 欧美另类69精品久久久久9999| 伊人久久亚洲影院| 久久久精品久久久久| 午夜精品久久久久久| 国产精品久久久999| 亚洲制服av| 日韩性生活视频| 欧美涩涩视频| 午夜精品久久久久影视| 亚洲一区二区三区四区五区黄| 欧美日韩在线看| 一区二区三区日韩欧美精品| 亚洲欧洲一区二区天堂久久| 欧美精品久久99久久在免费线| 亚洲日本欧美在线| 亚洲精品国产欧美| 欧美日韩免费在线视频| 亚洲欧美成人精品| 午夜精品久久久久久久久| 国产一本一道久久香蕉| 噜噜噜91成人网| 国产曰批免费观看久久久| 欧美中在线观看| 午夜综合激情| 激情文学综合丁香| 欧美顶级少妇做爰| 欧美女激情福利| 亚洲欧美精品suv| 午夜一区不卡| 亚洲大胆美女视频| 99精品国产一区二区青青牛奶| 国产精品丝袜91| 美女精品国产| 欧美日韩天天操| 欧美伊人久久大香线蕉综合69| 久久xxxx| 亚洲最新色图| 午夜激情综合网| 最新国产の精品合集bt伙计| 亚洲精品一区二区网址| 国产亚洲人成a一在线v站| 亚洲电影有码| 国产免费一区二区三区香蕉精| 另类天堂av| 国产精品久久久久一区二区| 久久综合久久综合九色| 欧美理论电影网| 久久久久在线观看| 欧美激情综合五月色丁香小说| 欧美亚洲免费在线| 欧美sm重口味系列视频在线观看| 亚洲影院污污.| 欧美国产激情二区三区| 久久国产精品久久久久久电车| 欧美激情精品久久久久久久变态 | 亚洲欧美日韩一区二区三区在线| 久久久999精品| 亚洲综合成人在线| 欧美高清视频www夜色资源网| 性欧美1819性猛交| 欧美日韩性生活视频| 欧美gay视频| 国语自产精品视频在线看一大j8| 日韩视频永久免费| 亚洲麻豆视频| 欧美自拍偷拍| 午夜视频在线观看一区| 欧美日韩成人综合在线一区二区| 久久人人爽爽爽人久久久| 国产精品久久久久久户外露出 | 欧美亚洲一区二区在线观看| 欧美大片91| 亚洲国产成人91精品| 在线观看成人网| 羞羞视频在线观看欧美| 亚洲无亚洲人成网站77777| 欧美成人按摩| 亚洲国产精品久久久久秋霞影院| 精品av久久久久电影| 欧美一区二区三区成人| 亚洲毛片在线观看.| 伊伊综合在线| 久久国产高清| 久久美女性网| 国产在线高清精品| 久久国产精品黑丝| 久久久久久**毛片大全| 国产欧美一区二区精品忘忧草| 在线亚洲美日韩| 久久人人超碰| 另类综合日韩欧美亚洲| 在线视频观看日韩| 久久婷婷av| 亚洲大胆视频| 99re视频这里只有精品| 欧美日本中文| 一区二区三区国产盗摄| 亚洲女性喷水在线观看一区| 国产精品久久久久aaaa| 亚洲一区欧美一区| 久久精品99国产精品酒店日本| 国产综合香蕉五月婷在线| 欧美一区二区网站| 欧美99在线视频观看| 亚洲精品极品| 国产精品久久二区| 欧美一区二区在线播放| 男人的天堂成人在线| 日韩视频免费在线| 国产精品国产自产拍高清av王其 | 亚洲免费观看在线视频| 亚洲欧美网站| 影音先锋亚洲一区| 欧美理论电影在线播放| 亚洲男人第一网站| 欧美a级一区二区| 在线中文字幕一区| 国产日韩在线一区二区三区| 另类图片综合电影| 99亚洲视频| 久久这里有精品15一区二区三区| 亚洲区第一页| 国产欧美精品一区二区三区介绍| 久久久蜜桃精品| 一本一本久久a久久精品综合麻豆 一本一本久久a久久精品牛牛影视 | 欧美v国产在线一区二区三区| 一区免费在线| 欧美日韩福利| 性欧美在线看片a免费观看| 欧美成人黄色小视频| 亚洲午夜精品久久| 国产综合自拍| 欧美少妇一区二区| 久久综合亚州| 午夜精品一区二区三区在线播放 | 欧美电影在线播放| 性伦欧美刺激片在线观看| 亚洲精品一区二区三区蜜桃久| 国产农村妇女毛片精品久久麻豆 | 亚洲制服av|