Jump to content

CPU threads question

What exactly do CPU threads do? can someone send me a video on this, orrr give me an explanation on what they do?

Link to comment
Share on other sites

Link to post
Share on other sites

In terms of hyperthreading where CPU cores can handle 2 or more threads simultaneously, or at the OS level where individual processes run on threads and magically switch in and out?

Link to comment
Share on other sites

Link to post
Share on other sites

From the man himself:

 

 

CPU: i7-4790K --- HEATSINK: NZXT Kraken X61 --- MOBO: Asus Z97-A --- GPU: GTX 970 Strix --- RAM: 16GB ADATA XPG --- SSD: 512GB MX100 | 256GB BX200 HDD: 1TB WD Black --- PSU: EVGA SuperNova G2 --- CASE: NZXT H440 --- DISPLAY3 x Dell U2414H --- KEYBOARD: Pok3r (Clears) --- MOUSE: Logitech G Pro --- OS: Windows 10

Link to comment
Share on other sites

Link to post
Share on other sites

They allow your cpu to handle more parallel workloads. Most times threads=cores unless hyperthreaded then it 2x the number of cores. More threads allow for faster editing of videos, encoding music, unzipping compressed files, medical research, etc.

Link to comment
Share on other sites

Link to post
Share on other sites

This is a really dumbed down explanation. Fellow Computing Science students are going to roast me on this...  but a thread is basically a task that processed by a processing core. If your program supports multiple threads, each thread uses another available core. So if you have a program that checks for prime numbers, if it's not multithreaded, you'll have to wait for first number to finish in order to check the second one. With multithreaded programming, you can effectively have different threads check for prime numbers at the same time. It's much more complicated than this, but for an average consumer, you can look at it this way.

Intel® Core™ i7-12700 | GIGABYTE B660 AORUS MASTER DDR4 | Gigabyte Radeon™ RX 6650 XT Gaming OC | 32GB Corsair Vengeance® RGB Pro SL DDR4 | Samsung 990 Pro 1TB | WD Green 1.5TB | Windows 11 Pro | NZXT H510 Flow White
Sony MDR-V250 | GNT-500 | Logitech G610 Orion Brown | Logitech G402 | Samsung C27JG5 | ASUS ProArt PA238QR
iPhone 12 Mini (iOS 17.2.1) | iPhone XR (iOS 17.2.1) | iPad Mini (iOS 9.3.5) | KZ AZ09 Pro x KZ ZSN Pro X | Sennheiser HD450bt
Intel® Core™ i7-1265U | Kioxia KBG50ZNV512G | 16GB DDR4 | Windows 11 Enterprise | HP EliteBook 650 G9
Intel® Core™ i5-8520U | WD Blue M.2 250GB | 1TB Seagate FireCuda | 16GB DDR4 | Windows 11 Home | ASUS Vivobook 15 
Intel® Core™ i7-3520M | GT 630M | 16 GB Corsair Vengeance® DDR3 |
Samsung 850 EVO 250GB | macOS Catalina | Lenovo IdeaPad P580

Link to comment
Share on other sites

Link to post
Share on other sites

@Doomerson of course that's what's going on in theory. Multi-threaded programming is a lot more complicated because ...well I'll let these cute puppies explain the problem.

6f3925bd03870f21.jpg

Intel® Core™ i7-12700 | GIGABYTE B660 AORUS MASTER DDR4 | Gigabyte Radeon™ RX 6650 XT Gaming OC | 32GB Corsair Vengeance® RGB Pro SL DDR4 | Samsung 990 Pro 1TB | WD Green 1.5TB | Windows 11 Pro | NZXT H510 Flow White
Sony MDR-V250 | GNT-500 | Logitech G610 Orion Brown | Logitech G402 | Samsung C27JG5 | ASUS ProArt PA238QR
iPhone 12 Mini (iOS 17.2.1) | iPhone XR (iOS 17.2.1) | iPad Mini (iOS 9.3.5) | KZ AZ09 Pro x KZ ZSN Pro X | Sennheiser HD450bt
Intel® Core™ i7-1265U | Kioxia KBG50ZNV512G | 16GB DDR4 | Windows 11 Enterprise | HP EliteBook 650 G9
Intel® Core™ i5-8520U | WD Blue M.2 250GB | 1TB Seagate FireCuda | 16GB DDR4 | Windows 11 Home | ASUS Vivobook 15 
Intel® Core™ i7-3520M | GT 630M | 16 GB Corsair Vengeance® DDR3 |
Samsung 850 EVO 250GB | macOS Catalina | Lenovo IdeaPad P580

Link to comment
Share on other sites

Link to post
Share on other sites

i think its better to understand what a computer is. A computer is a machine either electronic, human, or mechanical that takes two inputs:

1. instruction or program

2. data

#1 tells the machine (CPU) what to do with #2.

one thread is one instruction input, two threads allows for two instruction inputs, etc.

 

here is some further reading:

https://en.wikipedia.org/wiki/Thread_(computing)

I like to mention human computers because its easier on the imagination. Not many people realise that the first computers were not powered by electricity or valves but by actual french men that ran on baguettes:

https://en.wikipedia.org/wiki/Human_computer

Heres a more mathematical description of modern computing:

https://en.wikipedia.org/wiki/Turing_machine

 

             ☼

ψ ︿_____︿_ψ_   

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×