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

626 views

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

In: 1

5 Answers

Anonymous 0 Comments

A computer program is a bit like a combination of a cookbook and a Choose Your Own Adventure book. It has a sequence of simple instructions (1. crack an egg, 2. put it into a bowl), and also can jump around (if the person wants sunny side up eggs, go to page 5).

A CPU _core_ is like a cook. The cook can only do one instruction at a time. A thread is like a little bookmark that tells you where you are in the book. You can use this to allow a single cook to work on multiple dishes, jumping between bookmarks in several recipes (_multitasking_) or to allow multiple cooks to work on different parts of a complex recipe (_multiprocessing_).

CPUs like in your computer have several cores, but CPUs in simpler devices might only have one core.

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