Previous | Next --- Slide 57 of 79
Back to Lecture Thumbnails

What is the difference between the first two bullet points? Are they describing the same model?


I think maybe the second and third bullet points are sub categories of the first bullet point. I'm not sure.


A good article about HypeThreading. Intels implementation of SMT


I'm thinking about what kind of program will hyper threading be most helpful with.

If program is memory-bound, then CPU can't help with bus speed. If the program is mainly made of computation, then hyper threading doesn't seem to help because there are limited number of ALUs.

It looks like it will be most useful for the kind of program with memory visit and computation combined in a good ratio or certain good patterns?


Because it is the processor which makes decision about which threads to run each clock and not the operating system (assuming that all the threads belong to the same process. Is that so?), am I correct to assume that the execution context mentioned here will have more than just the general purpose registers. Like it should at least have program counter?


Another article on user thread and kernel threads in pthreads might be interesting.


From my knowledge in Operating System, there are some certain scheduling algorithms implemented in the operating system, like elevator algorithm, round-robin, etc.

How does the Operating System level task scheduling work with the hardware level multi-threading?

It really confuses me in the slides that it's the processor decides which thread to run, not the OS. So what's the meaning of OS's task scheduling?


@qqkk to give a very specific example with intel's hyperthreading (as I understand it):

the OS scheduler is still the thing that decides what OS-level runnables (threads, processes, tasks, whatever) are going to be run on a "core". But, for instance, on a quad-core intel processor, the processor might tell the OS that there are 8 "cores" for things to be scheduled on. Then the OS can go ahead and schedule up to 8 threads to be run at any time; the hardware-level interleaving/the core making decisions about which thread to actually run happens now, when the OS has scheduled 2 threads to be run on every actual physical core.


It really shocks me... Without operating system, the processor really knows which thread to execute? How does it identify one thread is stalling?


@Richard the processor issues the memory requests; it's pretty unsurprising that it knows when it's waiting for the response to come back...


@vincom2 So there are extra logic module added in the processor? (I was mainly confused why the processor even has a "brain" without operating system...)


@Richard I'm not a hardware person, real computers are bad, yada yada yada, idk why I'm even in this class :P but modern processors do so much clever stuff anyway (e.g. rewrite your CISC instructions into an RISC instruction set) that that sounds very plausible


@Richard many modern advancements are done in hardware, improving the processor's "brain." To even function as a processor it needs to have some sort of method to keep track of states, which is the microarchitecture. It needs to know when it's still waiting for data to be retrieved from memory, it needs to know which instruction is being decoded, it needs to know what logic to execute once the instruction is decoded, etc. Branch prediction is another set of logic in the processor that helps it figure out whether a conditional jump will or will not be taken.

If the processor didn't have a brain, there would be no operating system :)