A thread scheduling mechanism is provided that flexibly enforces
performance isolation of multiple threads to alleviate the effect of
anti-cooperative execution behavior with respect to a shared resource,
for example, hoarding a cache or pipeline, using the hardware
capabilities of simultaneous multi-threaded (SMT) or multi-core
processors. Given a plurality of threads running on at least two
processors in at least one functional processor group, the occurrence of
a rescheduling condition indicating anti-cooperative execution behavior
is sensed, and, if present, at least one of the threads is rescheduled
such that the first and second threads no longer execute in the same
functional processor group at the same time.