# Ch19 Translation Lookaside Buffers(TLB) 本章的標題是 「Paging: Faster Translations (TLBs)」,重點在於如何使用 Translation Lookaside Buffers (TLBs) 來加速虛擬位址的轉換。 ## Intro - 是一種存放在 CPU 中的 cache,用來記錄熱門的 PTE 資訊 - **目的**: - 減少 fetch memory 的次數 - fetch memory 的時間比在 CPU 內查詢慢很多 ## 基本流程 - 尋找 **TLB** 是否有存到該 VPN 對應的 PFN - **TLB hit**:直接轉換 - **TLB miss**:查詢 Page table 並更新 TLB,重試指令 ## 結構 TLB entry 通常包含以下元素 - VPN - PFN - **Valid bit**:該紀錄是否有效 - **1**:可直接取用 - **0**:代表尚未 load 或者需要更新 - **Protection bits**:表示該 page 的存取權限 - **r**:read - **w**:write - **x**:execute - **ASID(Address Space Identifier)**: - 不同 process 有時會有相同的 VPN - 需要透過 **ASID** 來區別是哪一個 process - Dirty bit(不一定有):page 是否被修改過 
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up