![第三章 存儲管理(memory management)武漢工業(yè)_第1頁](http://file3.renrendoc.com/fileroot_temp3/2022-2/22/313d3645-b04c-4f75-8c07-f4512c06a627/313d3645-b04c-4f75-8c07-f4512c06a6271.gif)
![第三章 存儲管理(memory management)武漢工業(yè)_第2頁](http://file3.renrendoc.com/fileroot_temp3/2022-2/22/313d3645-b04c-4f75-8c07-f4512c06a627/313d3645-b04c-4f75-8c07-f4512c06a6272.gif)
![第三章 存儲管理(memory management)武漢工業(yè)_第3頁](http://file3.renrendoc.com/fileroot_temp3/2022-2/22/313d3645-b04c-4f75-8c07-f4512c06a627/313d3645-b04c-4f75-8c07-f4512c06a6273.gif)
![第三章 存儲管理(memory management)武漢工業(yè)_第4頁](http://file3.renrendoc.com/fileroot_temp3/2022-2/22/313d3645-b04c-4f75-8c07-f4512c06a627/313d3645-b04c-4f75-8c07-f4512c06a6274.gif)
![第三章 存儲管理(memory management)武漢工業(yè)_第5頁](http://file3.renrendoc.com/fileroot_temp3/2022-2/22/313d3645-b04c-4f75-8c07-f4512c06a627/313d3645-b04c-4f75-8c07-f4512c06a6275.gif)
版權說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權,請進行舉報或認領
文檔簡介
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);/平臺無關sprintf(buff,”%s”,”Hello World”);/sleep(10000);/for kswapdfr
3、ee(buff); /平臺無關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)系上傳者。文件的所有權益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預覽,若沒有圖紙預覽就沒有圖紙。
- 4. 未經(jīng)權益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負責。
- 6. 下載文件中如有侵權或不適當內(nèi)容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 26《好的故事》說課稿-2024-2025學年語文六年級上冊統(tǒng)編版
- 1場景歌說課稿-2024-2025學年統(tǒng)編版語文二年級上冊
- 2024年秋一年級道德與法治下冊 第二單元 我和大自然 5 風兒輕輕吹說課稿 新人教版
- 18古詩三首浪淘沙(其一)說課稿-2024-2025學年六年級上冊語文統(tǒng)編版
- 8 設計制作小車(二) 說課稿-2024-2025學年科學四年級上冊教科版
- 23《月光曲》說課稿-2024-2025學年語文六年級上冊統(tǒng)編版
- 1 24時計時法(說課稿)-2024-2025學年三年級上冊數(shù)學人教版001
- 2023九年級道德與法治上冊 第三單元 文明與家園 第五課 守望精神家園第2框 凝聚價值追求說課稿 新人教版
- 2025北京市飼料采購合同新
- 2025建造船舶所要用到的合同
- 農(nóng)產(chǎn)品貯運與加工考試題(附答案)
- 學校財務年終工作總結(jié)4
- 2025年人民教育出版社有限公司招聘筆試參考題庫含答案解析
- 康復醫(yī)學治療技術(士)復習題及答案
- 《血管性血友病》課件
- 2025年汽車加氣站作業(yè)人員安全全國考試題庫(含答案)
- 2024年司法考試完整真題及答案
- 高三日語一輪復習日語助詞「に」和「を」的全部用法課件
- 2024年山東省高考政治試卷真題(含答案逐題解析)
- 2024年執(zhí)業(yè)藥師繼續(xù)教育專業(yè)答案
- 2024-2025學年人教版七年級數(shù)學上冊期末達標測試卷(含答案)
評論
0/150
提交評論