What are the “Threads” of a CPU and why do they exist?

624 views

What are the “Threads” of a CPU and why do they exist?

In: 1

5 Answers

Anonymous 0 Comments

A CPU core can only perform one instruction at a time. A CPU takes time to get these instructions from your hard drive -> RAM, then to local CPU caches. Sometimes these instructions take more time to complete or are waiting for some other peripheral to return data. CPU cores optimize this by having threads, where they build up another set of instructions to perform and can swap between them if necessary or if it makes sense. It’s a method to effectively have two separate processes/sets of instructions sharing a CPU core without the overhead of the very large and complicated CPU core. Just have to duplicate the storage mechanism for the instruction sets and allow swapping between them safely.

Note: Some oversimplification of course for ELI5, but the basis is there.

You are viewing 1 out of 5 answers, click here to view all answers.