The present invention discloses a method and apparatus that uses extensions
to the TLB entry to dynamically identify pages of memory that can be
weakly ordered or must be strongly ordered and enforces the appropriate
memory model on those pages of memory. Such identification and memory
model enforcement allows for more efficient execution of memory
instructions in a hierarchical memory design in cases where memory
instructions can be executed out of order. From the page table, the memory
manager constructs TLB entries that associate page frame numbers of memory
operands with page-granular client usage data and a memory order tag. The
memory order tag identifies the memory model that is currently being
enforced for the associated page of memory. The memory manager updates the
memory order tag of the TLB entry in accordance with changes in the client
usage information. In the preferred embodiment, the TLB structure is a
global TLB shared by all processors. In alternative embodiments, the TLB
structure may comprise either multiple distributed TLBs with shared
knowledge, each assigned to a different processor, or a combination of
multiple local TLBs, each assigned to a different processor, that exchange
information with a global TLB, which in turn provides data to the memory
manager to access the hierarchical memory system.