http://en.wikipedia.org/wiki/Multithreading_(computer_hardwa...
Can't the CPU just signal an interrupt for those, and let the OS scheduler handle it?
This is usually not efficient because handling an interrupt takes nearly as long as a cache miss (and let us not consider the case where the interrupt handler itself triggers a cache miss), but Intel did a prototype on the Itanium that worked this way.
A CPU scheduler (instruction unit) does not schedule threads or processes - instead it schedules instructions (assembly instructions).
A thread might block while waiting for IO (disk, net, user input, etc).
An instruction might block because it's waiting for the cache to load its data, or it might block because it does not have an available execution unit.
A modern CPU has, for example, 4 units that can add, 2 that can multiply, 1 for floating point, another for memory IO, another that does XOR, etc, etc.
If one of those is busy you try to find an instruction that can make use of an idle unit.
It's often hard to find an instruction because they often depend on each other, so you have to do them in order. With hyperthreading you have double the number of available instructions to choose from (and those two instruction streams are independent of each other).
The biggest problem with hyperthreading is the cache. Memory is very slow, so you cache memory locally, with hyperthreeading you have twice as much data to cache, so some data is evicted - this is bad.
Some tasks will be slower because of this, but most won't.
CPU based task scheduler can task switch on cache miss, or availability of single pieces of a CPU (like an adder).
Can't the CPU just signal an interrupt for those, and let the OS scheduler handle it?
1. http://en.wikipedia.org/wiki/Scheduling_(computing)