【正文】
? Thrashing ? a process is busy swapping pages in and out ? Questions: ? How do we detect Thrashing? ? What is best response to Thrashing? ? Program Memory Access Patterns have temporal and spatial locality ? Group of Pages accessed along a given time slice called the “Working Set” ? Working Set defines minimum number of pages needed for process to behave well ? Not enough memory for Working Set?Thrashing ? Better to swap out process? Locality In A MemoryReference Pattern WorkingSet Model ? ? ? workingset window ? fixed number of page references ? Example: 10,000 instructions ? WSi (working set of Process Pi) = total set of pages referenced in the most recent ? (varies in time) ? if ? too small will not enpass entire locality ? if ? too large will enpass several localities ? if ? = ? ? will enpass entire program ? D = ?|WSi| ? total demand frames ? if D physical memory ? Thrashing ? Policy: if D physical memory, then suspend/swap out processes ? This can improve overall system behavior by a lot! ? Q1: True _ False _ Paging does not suffer from external fragmentation ? Q2: True _ False _ The segment offset can be larger than the segment size ? Q3: True _ False _ Paging: to pute the physical address, add physical page and offset ? Q4: True _ False _ Uniprogramming doesn’t provide address protection ? Q5: True _ False _ LRU is always better than FIFO as to page fault rate ? Q6: True _ False _ In clock algorithm, the clock hand moving slowly is a better than fast Quiz: Memory Managment ? Q1: True _ False _ Paging does not suffer from external fragmentation ? Q2: True _ False _ The segment offset can be larger than the segment size ? Q3: True _ False _ Paging: to pute the physical address, add physical page and offset ? Q4: True _ False _ Uniprogramming doesn’t provide address protection ? Q5: True _ False _ LRU is always better than FIFO as to page fault rate ? Q6: True _ False _ In clock algorithm, the clock hand moving slowly is a better for us than fast Quiz : Memory Managment X X X X X X ? Q6: True _ False _ In clock algorithm, the clock hand moving slowly is a better than fast ? Q7: True _ False _ The LRU miss rate may increase as the cache size increases ? Q8: Assume a cache with 100 pages. The number of pages that the Improved Clock algorithm may need to check before finding a page to evict is at most ___ Quiz: Memory Managment ? Q6: True _ False _ In clock algorithm, the clock hand moving slowly is a better than fast ? Q7: True _ False _ The LRU miss rate may increase as the cache size increases ? Q8: Assume a cache with 100 pages. The number of pages that the Improved Clock algorithm may need to check before finding a page to evict is at most [_301__] Quiz: Memory Managment X X 65 2022年 8月 21日星期日 北京交通大學(xué)計(jì)算機(jī)學(xué)院 請(qǐng)求分頁(yè)存儲(chǔ)管理方式 請(qǐng)求分頁(yè)中的硬件支持 內(nèi)存分配策略和分配算法 調(diào)頁(yè)策略 頁(yè)面置換算法 66 2022年 8月 21日星期日 北京交通大學(xué)計(jì)算機(jī)學(xué)院 第四章 存儲(chǔ)器管理 內(nèi)存管理概述 連續(xù)分配存儲(chǔ)管理方式 基本分頁(yè)存儲(chǔ)管理方式 基本分段存儲(chǔ)管理方式 虛擬存儲(chǔ)器概念及關(guān)鍵技術(shù) 請(qǐng)求分頁(yè)存儲(chǔ)管理方式 請(qǐng)求分段存儲(chǔ)管理方式 67 2022年 8月 21日星期日 北京交通大學(xué)計(jì)算機(jī)學(xué)院 請(qǐng)求分段存儲(chǔ)管理方式 請(qǐng)求分段中的硬件支持 分段共享 分段保護(hù) x86體系中請(qǐng)求段頁(yè)式支撐機(jī)制 68 2022年 8月 21日星期日 北京交通大學(xué)計(jì)算機(jī)學(xué)院 段表機(jī)制 ? 段表項(xiàng)的擴(kuò)充 段名 段長(zhǎng) 分段基址 存取方式 訪問字段 修改位 狀態(tài)位 增補(bǔ)位 外存地址 起始 盤塊號(hào) 69 2022年 8月 21日星期日 北京交通大學(xué)計(jì)算機(jī)學(xué)院 地址變換機(jī)構(gòu) ? 在分段系統(tǒng)的地址變換機(jī)構(gòu)的基礎(chǔ)上,增加缺段中斷產(chǎn)生和處理并分段置換功能而構(gòu)成 ? 地址變換過程要領(lǐng) ? 從段表找到對(duì)應(yīng)分段的段表項(xiàng)獲悉該段尚未調(diào)入內(nèi)存時(shí),應(yīng)產(chǎn)生缺段中斷,請(qǐng)求操作系統(tǒng)從外存把該段調(diào)入內(nèi)存 ? 關(guān)于快表和段表的檢索及表項(xiàng)修改 70 2022年 8月 21日星期日 北京交通大學(xué)計(jì)算機(jī)學(xué)院 請(qǐng)求分段系統(tǒng)地址變換 訪問 [S][W] S段表長(zhǎng)度 且W分段長(zhǎng)度 ? 修改分段 S對(duì)應(yīng)段表項(xiàng)訪問字段和修改位 形成內(nèi)存物理地址 (A) = (分段基址 ) + (W) 返回 是 否 分段越界中斷處理 存取方式合法 ? 是 否 分段保護(hù)中斷處理 分段