ALEX asked in 電腦與網際網路軟體 · 1 decade ago

這是一個電腦軟硬體的問題....該怎麼解答呢??

電腦軟、硬體架構在運作時,何謂時間局部性(temporal locality)與空間局部性(spatial locality)??

1 Answer

Rating
  • 1 decade ago
    Favorite Answer

    Temporal locality:If an item is referenced, it will tend to be referenced again soon.

    Spatial locality:If an item is referenced, items whose address are close by will tend to be referenced soon.

    也就是說~

    Locality(區域性):程式執行,於存取記憶體時,並非平均地(uniformly)存取所有的位址空間,而是在某一段時間內,有集中於局部的現象‧

    temporal locality:最近存取過的記憶體位置,不久後又會被存取,如loop、stack‧

    spatial locality:某一位置被CPU存取,其鄰近的位置也將被存取,如array、stack、循序執行‧

Still have questions? Get your answers by asking now.