I have this whining question on my head, which stuck me for days.
Correct me if I’m wrong: My aspect on computer architecture and organisation is that,
In early day computers, there was a single processor on a single chip.
And with evaluation there were multi-chip processors, with each chip having a single processor.
Then in modern days there are multiprocessors. With each processor chip called a socket, this socket contained multiple processors. They are called cores.
- Core: An individual processing unit on a processor chip. A core may be equivalent in functionality to a CPU on a single – CPU system.
Now I will briefly lay my understanding on Hyper Threading Technology.
For each physical core that is actually present in the socket, the operating system addresses two virtual (logical) cores and shares the workload whenever possible.
These cores have multiple levels of large memory caches . And the logical processors sharing the execution units of each of core.
Now my question is what is a thread?
As a programmer when I create two threads and I run my program, how does the threads divide in to cores.
I want to know that on which logical processors that these threads run on.
I gave myself an answer for that,
These threads must be run on two separate logical processors that belongs to two physical cores, because if we divide these threads to the two logical processors of one physical core, concurrency is not achieved. As one logical processor is run at a given time in one physical core.
If my answer for my problem is wrong please help me out. I really appreciate it.