Performance of multithreaded chip multiprocessors and implications for operating system design