A method and apparatus are provided for implementing thread replacement
for optimal performance in a two-tiered multithreading structure. A first
tier thread state storage stores a limited number of runnable thread
register states. A second tier thread storage facility stores a second
number of thread states that is greater than the limited number of
runnable thread register states. Each stored thread state includes
predefined selection data. A runnable thread selection logic coupled
between the first tier thread state storage and the second tier thread
storage facility, uses the stored predefined selection data for
selectively exchanging thread states between the first tier limited
number of runnable thread register states and the second tier thread
storage facility.