*** Welcome to piglix ***

Memory access pattern


In computing, a memory access pattern or IO access patterns is the pattern with which a system or program reads and writes memory or secondary storage. These patterns differ in the level of locality of reference and drastically affect cache performance, and also have implications for the approach to parallelism and distribution of workload in shared memory systems. Further, cache coherency issues can affect multiprocessor performance, which means that certain memory access patterns place a ceiling on parallelism (which manycore approaches seek to break ).

Computer memory is usually described as 'random access', but traversals by software will still exhibit patterns that can be exploited for efficiency. Various tools exist to help system designers and programmers understand,analyse and improve the memory access pattern, e.g. VTune, Vectorization Advisor and others, including tools to address GPU memory access patterns

Memory access patterns also have implications for security, which motivates some to try and disguise a programs activity for privacy reasons.

The simplest extreme is the sequential access pattern, where data is read, processed, and written out with straightforward incremented/decremented addressing. These access patterns are highly amenable to prefetching.

Strided or simple 2D,3D access patterns (e.g. stepping through multi-dimensional arrays) are similarly easy to predict, and are found in implementations of linear algebra algorithms and image processing. Loop tiling is an effective approach. Some systems with DMA provided a strided mode for transferring data between subtile of larger 2D arrays and scratchpad memory.


...
Wikipedia

...