作業系統›Ch8 虛擬記憶體
第 2 題/共 47 題
◀ OS 2/47
2. Paging、Inverted Page Table、TLB、Effective Access Time
#OS-08-002難PagingInverted Page TableTLBEffective Access Time

考慮一個分頁系統(paging system),page size 為 2KB,實體記憶體(physical memory)大小為 64KB。令 P 表示實體位址(physical address)所需的位元數,L 表示邏輯位址(logical address)所需的位元數。

傳統做法(conventional way)中,記憶體裡儲存一個 single-level page table,若以傳統方式實作,page table 在記憶體中含有 1024 筆 entries。記憶體存取時間為 180 奈秒(ns)。假設傳統 page table 的 hit ratio 為 60%,平均 page fault service time 為 30,000 微秒(μs)。因此,傳統做法(single-level page table)的 effective memory access time 為 X。

Alex 想考慮使用 "inverted page table" 來改善邏輯位址轉實體位址的轉換。經仔細計算後,他發現 inverted page table 需要 N 筆 entries。此外,Alex 考慮使用 translation look-aside buffer (TLB) 硬體來實作 inverted page table 的概念。搜尋 TLB 需要 20 奈秒(ns)。假設 inverted page table 的 hit ratio 為 90%。Alex 做法(TLB-implemented inverted page table)的 effective memory access time 為 Y。因此,Alex 的做法改善了 effective memory access time,其中 A < speedup(以 effective memory access time 計) < B,這裡 A、B 為正整數。

請計算 P、L、X、N、Y、A、B 的值,選出正確的敘述。

📄 台大114
跳轉到第題
▤完整推導請見《WH 資工筆記 · 作業系統》Ch8 虛擬記憶體
本章題號 · 1–20 / 47