agrawalashishku 0 Newbie Poster

I'll tell what I know and then I will ask questions. Please correct me where I am wrong
Suppose I have two cores in my CPU or 2 processors. What i know is that it is the duty of the operating system to give me a processor to execute my code on. So i can write a simple C or assembly program and have no problem.
But what I want to know is that at least processor must somehow be able to distinguish between the cores. So that it can assign the processes to them. So how does that happen. IF all it can do is move %eax, %eax then how does it distinguish.

is it true that two threads of the same process can run on two different proceesors??
If that is true then how does the OS manage it.

Moreover is it possible that I can run a simple sequential single threaded assembly code on two processors or cores simultaneously by distinguishing between the cores in the way OS does, if it does so at all.

I tried to search around the net a lot but I have found nothing mainly because I have been unable to give the right keywords.

Please dont bother about writing the whole answer. I am ready to do my job and I will try to read it out myself if someone would be so kind as to point me to a **couple of links**.
Thank you.