My CPU is an i5-8400, which has 6
cores and 6
threads. What does this mean? Initially, I thought it meant that I had 6 threads available per core, which totals 36
threads.
Say I'm making a C
program, where I create pthreads
, does that mean I can only have 6
threads in that program, as its process will run on a single CPU core? If that's the case, what would happen if I tried creating a seventh thread?
When I go to task manager (windows), I see thousands of threads:
, which means my understanding was wrong.
So my questions are:
- How does my CPU number of threads relate to how many threads I can create in a process, i.e., say I create a
C
program; how many threads can I create in its process? - What happens if I try to create a thread, and there are no more threads available?