Scheduling Threads on Multi-Core Processors