Patent ID: 7398362

Claim:
A method comprising: in response to executing a first program stream: implementing a first address mapping for the first program stream during an execution of the first program stream; receiving a first linear address for accessing a multiple-bank memory, the first linear address associated with the first program stream; and determining a first bank identifier based on the first linear address and the first address mapping; in response to a context switch from the first program stream to a second program stream: implementing a second address mapping for the second program stream, the second address mapping different than the first address mapping; receiving a second linear address for accessing the multiple bank memory, the second linear address associated with the second program stream; determining a second bank identifier based on the second linear address and the second address mapping; wherein determining the first bank identifier comprises: determining a first bit value at a first bit position of the first linear address and a second bit value at a second bit position of the first linear address, the first bit position and the second bit position based on the first address mapping; and performing an exclusive OR (XOR) operation using the first bit value and the second bit value to determine a value of a first bit of the first bank identifier and a value of a second bit of the first bank identifier.