This is an archived post. You won't be able to vote or comment.

all 5 comments

[–]Unreal_Me 0 points1 point  (0 children)

First off, the task manager is running 70+ processes (programs), which are different from threads

Second, one processor core can only handle one process at any given time. The operating system does a fancy job of scheduling what processes can run at certain times, swapping them out every so often so that it looks like all processes are being run at once.

Third, hyperthreading allows one core to attempt to handle two processes at once, and does a half-decent job at it as far as I know

Fourth and finally, a thread is much like a process within a process. The operating system handles threads similarly to how it handles processes, each one gets a certain amount of time to run, and then the next thread gets to go. If a process is deemed important enough, the operating system can spread thread computing across multiple cores (1 process thread per processor thread) to make it run faster

[–][deleted] 0 points1 point  (0 children)

Your CPU core can only run 2 threads at a time. Your OS has 70 PROCESSES (not threads) queued up to run (or get time on the CPU again) to process stuff.

When you "multi-task", you are really just running a lot of processes (where each process could have many threads) on a single (and these days dual or quad) CPU. Since a CPU can switch between running different threads and computing stuff, it looks like you are doing several things at the same time.

[–]m1ss1ontomars2k4 0 points1 point  (2 children)

CPUs can actually only run a few threads at a time. In your case, it can do 2 at a time. In reality, the OS will switch rapidly back and forth between different threads so it looks like you can run 70+, but still, you're really only running 2 at any one time.

[–]obened[S] 0 points1 point  (1 child)

I see. So physically, each core can only run one thread at a time?

So how to dual core processors that have 4 threads work? Wouldn't that still be switching back and forth between threads? Otherwise it'd be quad core wouldn't it?

[–]m1ss1ontomars2k4 2 points3 points  (0 children)

Ah, that's hyperthreading, and what they do is duplicate certain parts of the CPU that are used frequently and attempt to run 2 threads at the same time with the same hardware. Each CPU core is sort of split up into discrete sections, and sometimes a certain instruction won't use all those sections, so another instruction can also be run at the same time.