A method, apparatus, and computer program product are disclosed in a data
processing system for sharing data in a cache among multiple threads in a
simultaneous multi-threaded (SMT) processor. The SMT processor executes
multiple threads concurrently during each clock cycle. The cache is
dynamically allocated for use among the multiple threads. Portions of the
cache are capable of being designated to store private data that is used
exclusively by only a first one of the threads. The portions of the cache
are capable of being designated to store shared data that can be used by
any one of the multiple threads. The size of the portions can be changed
dynamically during execution of the threads.