The present invention comprises a data access pattern interface that
allows software to specify one or more data access patterns such as
stream access patterns, pointer-chasing patterns and producer-consumer
patterns. Software detects a data access pattern for a memory region and
passes the data access pattern information to hardware via proper data
access pattern instructions defined in the data access pattern interface.
Hardware maintains the data access pattern information properly when the
data access pattern instructions are executed. Hardware can then use the
data access pattern information to dynamically detect data access
patterns for a memory region throughout the program execution, and
voluntarily invoke appropriate memory and cache operations such as
pre-fetch, pre-send, acquire-ownership and release-ownership. Further,
hardware can provide runtime monitoring information for memory accesses
to the memory region, wherein the runtime monitoring information
indicates whether the software-provided data access pattern information
is accurate.