版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進行舉報或認領(lǐng)
文檔簡介
1、LibraryModule#1Module#2Module#nLinkerLoadModuleLoaderRAM Maintains the states of partitionsUsing the logical segment no as the index to find the correspondent physics segment(使用邏輯段號作(使用邏輯段號作為索引查段表得到物理段號);為索引查段表得到物理段號);Physics address= offset in logical address + start address in segment table entry;
2、 Protection: If the offset in logical address is large than the length in the segment table entry, a protection error will generate and OS will process the error. const int BUFFSIZE=256; int main() char * buff=(char *)malloc(BUFFSIZE);/平臺無關(guān)sprintf(buff,”%s”,”Hello World”);/sleep(10000);/for kswapdfr
3、ee(buff); /平臺無關(guān)return SUCCESS; ./ hello world /實現(xiàn)映射,使用物理內(nèi)存,運行時分配,運行完回收v Modify BitP h y s i c a l M e m o r y P a g e T a b l e P a g e D i r e c t o r y T w o L e v e l P a g e T a b l e Virtual Address Page# Offset Page# Entry Chain (Hash) Frame# Hash Table Inverted Page Table Frame# Offset Real A
4、ddress Invert Page Table v Segment Limit Check OS uses special register to maintain the length of segment table and the length of every segment.v Access Control Every segment table entry has several access control bits to define the access limit.v Privilege Ring Every segment table entry has define
5、the privilege for process running in a ring.v A program can access the data which is in the same ring or lower privilege ring.v A program can call the functions which are in the same ring or higher privilege ring.v Paging, which is transparent to the programmer, eliminates external fragmentation and
6、 reduces the internal fragmentation, and thus provides efficient use of main memory.v Segmentation, which is visible to the programmer, has the ability to handle growing data structures, modularity, and support for sharing and protection.v To combine the advantages of both, using segmentation/paging
7、.v The design of memory management portion of an OS depends on three fundamental areas of choice:v The choices made in the first two areas depend on the hardware platform available. All important OS provide virtual memory. Pure segmentation systems are becoming rare.v The choices in the third areas
8、are the domain of OS. Gives a process a fixed number of pages within which to execute. The number is decided at initial load time and may be determined based on the type of process. When a page fault occurs, one of the pages of that process must be replaced by the needed page. The number of page fra
9、mes allocated to a process to be varied over the lifetime of the process. The number of pages allocated to a process can be decided by the page fault rate.v On a nonuniform memory access (NUMA), multiprocessor, the distributed, shared memory of the machine can be referenced by any processor on the m
10、achine, but the time for accessing a particular physical location varies with the distance between the processor and the memory module.v Thus, performance depends on the extent to which data reside close to the processors that use them. A page is brought into main memory only when a reference is mad
11、e to a location on that page. As more and more pages are brought in, page faults should drop to a very low level. Chooses only among the resident pages of the process that generated the page fault in selecting a page to replace.v How to determine resident set size and the timing of changes.-working
12、set strategy Page Address Stream 2 3 2 1 5 2 4 5 3 2 5 2 2 2 2 2 2 2 4 4 4 2 2 2 3 3 3 3 3 3 3 3 3 3 3 1 5 5 5 5 5 5 5 5 F F F F F F O OP PT T a al lg go or ri it th hm m Page Address Stream 2 3 2 1 5 2 4 5 3 2 5 2 2 2 2 2 2 2 2 2 3 3 3 3 3 3 3 5 5 5 5 5 5 5 5 1 1 1 4 4 4 2 2 2 F F F F F F F L LR RU
13、 U a al lg go or ri it th hm m v Examination of large numbers of traces of programs with sequential reference patterns shows that LRU performs poorly. Page Address Stream 2 3 2 1 5 2 4 5 3 2 5 2 2 2 2 2 5 5 5 5 3 3 3 3 3 3 3 3 2 2 2 2 2 5 5 1 1 1 4 4 4 4 4 2 F F F F F F F F F F FI IF FO O a al lg go or ri it th hm m v FIFO is a simple algorithm and is easy to implement.v For a program that has sequential reference patterns, FIFO can get good performanc
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預覽,若沒有圖紙預覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負責。
- 6. 下載文件中如有侵權(quán)或不適當內(nèi)容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 貸款政策居間合同范本
- 健身房裝修保修服務(wù)協(xié)議
- 快遞行業(yè)配送合同標準模板
- 2025年庭院園藝植物病蟲害防治與施工合同3篇
- 深圳2025年廣東深圳博物館勞務(wù)派遣工作人員招聘6人筆試歷年參考題庫附帶答案詳解
- 2025年度進出口貿(mào)易合規(guī)審查合同3篇
- 安徽2025年安徽商貿(mào)職業(yè)技術(shù)學院高層次人才引進25人筆試歷年參考題庫附帶答案詳解
- 2024年度專用藝術(shù)品買賣合同
- 廈門2025年福建廈門市公安文職人員服務(wù)中心招聘17人筆試歷年參考題庫附帶答案詳解
- 2024年起道機(齒條式千斤頂)項目可行性研究報告
- 房地產(chǎn)營銷策劃 -佛山龍灣壹號學區(qū)房項目推廣策略提案方案
- 產(chǎn)品共同研發(fā)合作協(xié)議范本5篇
- 風水學的基礎(chǔ)知識培訓
- 吸入療法在呼吸康復應(yīng)用中的中國專家共識2022版
- 1-35kV電纜技術(shù)參數(shù)表
- 信息科技課程標準測(2022版)考試題庫及答案
- 施工組織設(shè)計方案針對性、完整性
- 2002版干部履歷表(貴州省)
- DL∕T 1909-2018 -48V電力通信直流電源系統(tǒng)技術(shù)規(guī)范
- 2024年服裝制版師(高級)職業(yè)鑒定考試復習題庫(含答案)
評論
0/150
提交評論