cache miss, a TLB miss and page fault

前端 未结 5 1267
故里飘歌
故里飘歌 2020-12-07 10:24

Can someone clearly explain me the difference between a cache miss, a tlb miss and page fault, and how do these affect the effective memory access time?

5条回答
  •  抹茶落季
    2020-12-07 10:46

    The Operating system uses virtual memory and page tables maps these virtual address to physical address. TLB works as a cache for such mapping.

     program >>> TLB >>> cache >>> Ram
    

    A program search for a page in TLB, if it doesn't find that page it's a TLB miss and then further looks for the page in cache.

    If the page is not in cache then it's a cache miss and further looks for the page in RAM.

    If the page is not in RAM, then it's a page fault and program look for the data in secondary storage.

    So, typical flow would be

    Page Requested >> TLB miss >> cache miss >> page fault >> looks in secondary memory. 
    

提交回复
热议问题