Discussion in 'Computing and Networks' started by psalmsI.Tworld, May 17, 2012.
i need some one to help with definite meaning of threading in CPU term..........
Did u try Google?
When a CPU is executing a program, it maintains the execution state in a set of registers and often also maintains a stack for managing subroutine return addresses and temporary storage.
A single CPU can execute multiple threads by periodically switching back and forth between them. When it switches between threads it has to switch the execution context by saving the first thread's registers and instruction pointer and loading the next thread's registers and instruction pointer before proceeding.
In a computer with multiple CPUs, a thread that becomes eligible for further processing can be schedule on any available CPU. That other CPU can load the execution context of the thread and continue running it.
Usually an application must be written in a specific way to gain the benefits of multiple threads running simultaneously on multiple CPUs. The application developer has to define which parts of the program are run on threads and how many threads are allocated. The operating system usually handles the thread scheduling and time slicing.