Jump to content

So, how exactly does a CPU work?

I know it has the control unit and the ALU.

I also know it uses different types of registers like how the storage register is used to store the result of an arithmetic operation or a logical calculation (correct me if I'm wrong) and a general register that does whatever the control unit tells it to as well but there's obviously a lot more I don't know. 

 

What is a Floating point unit? What exactly is it? I know that AMD's Bulldozer shared one FPU between two cores which proved to be a pretty big bottle neck. Why? 

 

If the core "modules" posed such an issue to AMD for performance, why couldn't they use a software implementation to "merge" two physical cores into one like how Intel is doing with reverse hyperthreading? 

 

Does every core get a control unit? Or is it more like there's one control unit for one CPU and then each core has its own ALU? If each core gets a control unit, wouldn't that introduce overhead? 

 

What exactly is an instruction set? I see talks of Intel implementing new instruction sets into their CPUs. How does that impact performance? Does it mean that new instruction sets means that the CPUs process the raw data they've been given in a better and more efficient manner?

 

 

Sorry for all these questions ( I have more, lol) but YouTube was no help and I think I want to be a CPU architect one day:D

 

 

Link to comment
https://linustechtips.com/topic/475471-help-me-understand/
Share on other sites

Link to post
Share on other sites

this answers all your questions

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

youre welcome

NEW PC build: Blank Heaven   minimalist white and black PC     Old S340 build log "White Heaven"        The "LIGHTCANON" flashlight build log        Project AntiRoll (prototype)        Custom speaker project

Spoiler

Ryzen 3950X | AMD Vega Frontier Edition | ASUS X570 Pro WS | Corsair Vengeance LPX 64GB | NZXT H500 | Seasonic Prime Fanless TX-700 | Custom loop | Coolermaster SK630 White | Logitech MX Master 2S | Samsung 980 Pro 1TB + 970 Pro 512GB | Samsung 58" 4k TV | Scarlett 2i4 | 2x AT2020

 

Link to comment
https://linustechtips.com/topic/475471-help-me-understand/#findComment-6371393
Share on other sites

Link to post
Share on other sites

So, how exactly does a CPU work?

I know it has the control unit and the ALU.

I also know it uses different types of registers like how the storage register is used to store the result of an arithmetic operation or a logical calculation (correct me if I'm wrong) and a general register that does whatever the control unit tells it to as well but there's obviously a lot more I don't know. 

 

What is a Floating point unit? What exactly is it? I know that AMD's Bulldozer shared one FPU between two cores which proved to be a pretty big bottle neck. Why? 

 

If the core "modules" posed such an issue to AMD for performance, why couldn't they use a software implementation to "merge" two physical cores into one like how Intel is doing with reverse hyperthreading? 

 

Does every core get a control unit? Or is it more like there's one control unit for one CPU and then each core has its own ALU? If each core gets a control unit, wouldn't that introduce overhead? 

 

What exactly is an instruction set? I see talks of Intel implementing new instruction sets into their CPUs. How does that impact performance? Does it mean that new instruction sets means that the CPUs process the raw data they've been given in a better and more efficient manner?

 

 

Sorry for all these questions ( I have more, lol) but YouTube was no help and I think I want to be a CPU architect one day:D

 

Just for the record, reverse hyperthreading doesn't exist, it was complete speculation based on one outlier test result, and the claim has already been retracted by the website that started the rumor.

Link to comment
https://linustechtips.com/topic/475471-help-me-understand/#findComment-6371435
Share on other sites

Link to post
Share on other sites

You probably wont find people on this forum that can really answer the questions you're asking.

System specs
  • Graphics card: Asus GTX 980 Ti (Temp target: 60c, fan speed: slow as hell)
  • CPU: Intel 6700k @ 4.2Ghz
  • CPU Heatsink: ThermalRight Silver Arrow Extreme
  • Motherboard: Asus Maximus Viii Gene
  • Ram: 8GB of DDR4 @ 3000Mhz
  • Headphone source: O2 + Odac 
  • Mic input: Creative X-Fi Titanium HD
  • Case: Fractal Design Arc midi R2
  • Boot Drive: Samsung 840 Pro 128GB 
  • Storage: Seagate SSHD 2TB
  • PSU: Be quiet! Dark Power Pro 550w

Peripherals

  • Monitor: Asus ROG Swift PG278Q
  • Mouse: Razer DeathAdder Chroma (16.5 inch/360)
  • Mouse surface: Mionix Sargas 900
  • Tablet: Wacom Intuos Pen
  • Keyboard: Filco Majestouch Ninja, MX Brown, Ten Keyless 
  • Headphones: AKG K7xx
  • IEMs: BrainWavs S1
Link to comment
https://linustechtips.com/topic/475471-help-me-understand/#findComment-6371455
Share on other sites

Link to post
Share on other sites

You probably wont find people on this forum that can really answer the questions you're asking.

Except that some of us just HAPPEN to be electronics engineers.

 

Spoiler

CPU:Intel Xeon X5660 @ 4.2 GHz RAM:6x2 GB 1600MHz DDR3 MB:Asus P6T Deluxe GPU:Asus GTX 660 TI OC Cooler:Akasa Nero 3


SSD:OCZ Vertex 3 120 GB HDD:2x640 GB WD Black Fans:2xCorsair AF 120 PSU:Seasonic 450 W 80+ Case:Thermaltake Xaser VI MX OS:Windows 10
Speakers:Altec Lansing MX5021 Keyboard:Razer Blackwidow 2013 Mouse:Logitech MX Master Monitor:Dell U2412M Headphones: Logitech G430

Big thanks to Damikiller37 for making me an awesome Intel 4004 out of trixels!

Link to comment
https://linustechtips.com/topic/475471-help-me-understand/#findComment-6371473
Share on other sites

Link to post
Share on other sites

Except that some of us just HAPPEN to be electronics engineers.

Exact reason I came here to ask. I've seen a few people here stating they're engineers. 

Link to comment
https://linustechtips.com/topic/475471-help-me-understand/#findComment-6371504
Share on other sites

Link to post
Share on other sites

Just for the record, reverse hyperthreading doesn't exist, it was complete speculation based on one outlier test result, and the claim has already been retracted by the website that started the rumor.

Thanks. Didn't know that. 

Link to comment
https://linustechtips.com/topic/475471-help-me-understand/#findComment-6371507
Share on other sites

Link to post
Share on other sites

If your REALLY looking to learn in depth about cpus and how they work, the engineering behind them... my best answer..... COLLEGE

University starts for me the beginning of next year. I'll be going into Comsci first and seeing if I like that.

Link to comment
https://linustechtips.com/topic/475471-help-me-understand/#findComment-6371515
Share on other sites

Link to post
Share on other sites

Its magical and forged by unicorns? :3

Zen-III-X8-5900X (Gamestation 5)

Spoiler

Case: Medion Micro-ATX Case / Case Fan Front: SUNON MagLev PF70251VX-Q000-S99 70mm / Case Fan Rear: Fanner Tech(Shen Zhen)Co.,LTD. 80mm (Purple) / Controller: Sony Dualshock 4 Wireless (DS4Windows) / Cooler: AMD Near-silent 125w Thermal Solution / CPU: AMD Ryzen 5 3600, 6-cores, 12-threads, 4.2/4.2GHz, 35,3MB cache (T.S.M.C. 7nm FinFET) / CPU: AMD Ryzen 9 5900X, 12(8)-cores, 24(16)-threads, 4.5/4.8GHz, 70.5MB(68,35MB) cache (T.S.M.C. 7nm FinFET) / Display: HP 24" L2445w (64Hz OC) 1920x1200 / GPU: MSI GeForce GTX 970 4GD5 OC "Afterburner" @1450MHz (T.S.M.C. 28nm) / GPU: ASUS Radeon RX 6600 XT DUAL OC RDNA2 32CUs @2.6GHz 10.6 TFLOPS (T.S.M.C. 7nm FinFET) R.ID (NimeZ drivers) / Keyboard: HP KB-0316 PS/2 (Nordic) / Motherboard: ASRock B450M Pro4, Socket-AM4 (SAM enabled) / Mouse: Razer Abyssus 2014 / PCI-E: ASRock USB 3.1/A+C (PCI Express x4) / PSU: EVGA SuperNOVA G2, 550W / RAM A1 & B1: G.SKILL DDR4-3600MHz CL18-20-21-39-60-1T "Samsung 8Gbit C-Die" (2x8GB) / RAM A2 & B2: HyperX DDR4-3600MHz CL16-18-19-37-85-1T "SK Hynix 8Gbit CJR" (2x16GB) / Operating System: Windows 10 Home / Sound 1: Zombee Z500 / Sound 2: Logitech Stereo Speakers S-150 / Storage 1 & 2: Samsung 850 EVO 500GB SSD / Storage 3: Western Digital My Passport 2.5" 2TB HDD / Storage 4: Western Digital Elements Desktop 2TB HDD / Storage 5: Kingston A2000 1TB M.2 NVME SSD / Wi-fi & Bluetooth: ASUS PCE-AC55BT Wireless Adapter (Intel)

 Lake-V-X6-10600 (Gaming PC)

R23 score MC: 9190pts | R23 score SC: 1302pts

R20 score MC: 3529cb | R20 score SC: 506cb

Spoiler

Case: Cooler Master HAF XB Evo Black / Case Fan(s) Front: Noctua NF-A14 ULN 140mm Premium Fans / Case Fan(s) Rear: Corsair Air Series AF120 Quiet Edition (red) / Case Fan(s) Side: Noctua NF-A6x25 FLX 60mm Premium Fan / Controller: Sony Dualshock 4 Wireless (DS4Windows) / Cooler: Cooler Master Hyper 212 Evo / CPU: Intel Core i5-10600(ASUS Performance Enhancement), 6-cores, 12-threads, 4.4/4.8GHz, 13,7MB cache (Intel 14nm++ FinFET) / Display: ASUS 24" LED VN247H (67Hz OC) 1920x1080p / GPU: Gigabyte Radeon RX Vega 56 Gaming OC GCN5 56CUs @1.7GHz 12.19 TFLOPS (Samsung 14nm FinFET) R.ID (NimeZ drivers) / Keyboard: Logitech Desktop K120 (Nordic) / Motherboard: ASUS PRIME B460 PLUS, Socket-LGA1200 (SAM enabled) / Mouse: Razer Abyssus 2014 / PCI-E: ASRock USB 3.1/A+C (PCI Express x4) / PSU: EVGA SuperNOVA G2, 850W / RAM A1 & B1: HyperX DDR4-2666MHz CL13-15-15-30-45-2T "Samsung 8Gbit C-Die" (2x8GB) / RAM A2 & B2: Juhor DDR4-3200MHz CL16-20-20-38-72-2T "SK Hynix 8Gbit MFR" (2x16GB) / Operating System: Windows 10 Home / Sound: Zombee Z300 / Storage 1 & 2: Samsung 850 EVO 500GB SSD / Storage 3: Seagate® Barracuda 2TB HDD / Storage 4: Seagate® Desktop 2TB SSHD / Storage 5: Crucial P1 1000GB M.2 SSD/ Storage 6: Western Digital WD7500BPKX 2.5" HDD / Wi-fi: TP-Link TL-WN851N 11n Wireless Adapter (Qualcomm Atheros)

Vishera-X8-9370 | R20 score MC: 1476cb

Spoiler

Case: Cooler Master HAF XB Evo Black / Case Fan(s) Front: Noctua NF-A14 ULN 140mm Premium Fans / Case Fan(s) Rear: Corsair Air Series AF120 Quiet Edition (red) / Case Fan(s) Side: Noctua NF-A6x25 FLX 60mm Premium Fan / Case Fan VRM: SUNON MagLev KDE1209PTV3 92mm / Controller: Sony Dualshock 4 Wireless (DS4Windows) / Cooler: Cooler Master Hyper 212 Evo / CPU: AMD FX-8370 (Base: @4.4GHz | Turbo: @4.7GHz) Black Edition Eight-Core (Global Foundries 32nm) / Display: ASUS 24" LED VN247H (67Hz OC) 1920x1080p / GPU: MSI GeForce GTX 970 4GD5 OC "Afterburner" @1450MHz (T.S.M.C. 28nm) / GPU: Gigabyte Radeon RX Vega 56 Gaming OC @1501MHz (Samsung 14nm FinFET) / Keyboard: Logitech Desktop K120 (Nordic) / Motherboard: MSI 970 GAMING, Socket-AM3+ / Mouse: Razer Abyssus 2014 / PCI-E: ASRock USB 3.1/A+C (PCI Express x4) / PSU: EVGA SuperNOVA G2, 850W PSU / RAM 1, 2, 3 & 4: Corsair Vengeance DDR3-1866MHz CL8-10-10-28-37-2T (4x4GB) 16.38GB / Operating System 1: Windows 10 Home / Sound: Zombee Z300 / Storage 1: Samsung 850 EVO 500GB SSD (x2) / Storage 2: Seagate® Barracuda 2TB HDD / Storage 3: Seagate® Desktop 2TB SSHD / Wi-fi: TP-Link TL-WN951N 11n Wireless Adapter

Godavari-X4-880K | R20 score MC: 810cb

Spoiler

Case: Medion Micro-ATX Case / Case Fan Front: SUNON MagLev PF70251VX-Q000-S99 70mm / Case Fan Rear: Fanner Tech(Shen Zhen)Co.,LTD. 80mm (Purple) / Controller: Sony Dualshock 4 Wireless (DS4Windows) / Cooler: AMD Near-silent 95w Thermal Solution / Cooler: AMD Near-silent 125w Thermal Solution / CPU: AMD Athlon X4 860K Black Edition Elite Quad-Core (T.S.M.C. 28nm) / CPU: AMD Athlon X4 880K Black Edition Elite Quad-Core (T.S.M.C. 28nm) / Display: HP 19" Flat Panel L1940 (75Hz) 1280x1024 / GPU: EVGA GeForce GTX 960 SuperSC 2GB (T.S.M.C. 28nm) / GPU: MSI GeForce GTX 970 4GD5 OC "Afterburner" @1450MHz (T.S.M.C. 28nm) / Keyboard: HP KB-0316 PS/2 (Nordic) / Motherboard: MSI A78M-E45 V2, Socket-FM2+ / Mouse: Razer Abyssus 2014 / PCI-E: ASRock USB 3.1/A+C (PCI Express x4) / PSU: EVGA SuperNOVA G2, 550W PSU / RAM 1, 2, 3 & 4: SK hynix DDR3-1866MHz CL9-10-11-27-40 (4x4GB) 16.38GB / Operating System 1: Ubuntu Gnome 16.04 LTS (Xenial Xerus) / Operating System 2: Windows 10 Home / Sound 1: Zombee Z500 / Sound 2: Logitech Stereo Speakers S-150 / Storage 1: Samsung 850 EVO 500GB SSD (x2) / Storage 2: Western Digital My Passport 2.5" 2TB HDD / Storage 3: Western Digital Elements Desktop 2TB HDD / Wi-fi: TP-Link TL-WN851N 11n Wireless Adapter

Acer Aspire 7738G custom (changed CPU, GPU & Storage)
Spoiler

CPU: Intel Core 2 Duo P8600, 2-cores, 2-threads, 2.4GHz, 3MB cache (Intel 45nm) / GPU: ATi Radeon HD 4570 515MB DDR2 (T.S.M.C. 55nm) / RAM: DDR2-1066MHz CL7-7-7-20-1T (2x2GB) / Operating System: Windows 10 Home / Storage: Crucial BX500 480GB 3D NAND SATA 2.5" SSD

Complete portable device SoC history:

Spoiler
Apple A4 - Apple iPod touch (4th generation)
Apple A5 - Apple iPod touch (5th generation)
Apple A9 - Apple iPhone 6s Plus
HiSilicon Kirin 810 (T.S.M.C. 7nm) - Huawei P40 Lite / Huawei nova 7i
Mediatek Dimensity 700 (T.S.M.C 7nm) - Cherry Mobile Aqua S10 Pro 5G
Mediatek MT2601 (T.S.M.C 28nm) - TicWatch E
Mediatek MT6580 (T.S.M.C 28nm) - TECNO Spark 2 (1GB RAM)
Mediatek MT6592M (T.S.M.C 28nm) - my|phone my32 (orange)
Mediatek MT6592M (T.S.M.C 28nm) - my|phone my32 (yellow)
Mediatek MT6735 (T.S.M.C 28nm) - HMD Nokia 3 Dual SIM
Mediatek MT6737 (T.S.M.C 28nm) - Cherry Mobile Flare S6
Mediatek MT6739 (T.S.M.C 28nm) - my|phone myX8 (blue)
Mediatek MT6739 (T.S.M.C 28nm) - my|phone myX8 (gold)
Mediatek MT6750 (T.S.M.C 28nm) - honor 6C Pro / honor V9 Play
Mediatek MT6765 (T.S.M.C 12nm) - TECNO Pouvoir 3 Plus
Mediatek MT6797D (T.S.M.C 20nm) - my|phone Brown Tab 1
Qualcomm MSM8926 (T.S.M.C. 28nm) - Microsoft Lumia 640 LTE
Qualcomm MSM8974AA (T.S.M.C. 28nm) - Blackberry Passport
Qualcomm SDM710 (Samsung 10nm) - Oppo Realme 3 Pro

 

Link to comment
https://linustechtips.com/topic/475471-help-me-understand/#findComment-6373704
Share on other sites

Link to post
Share on other sites

Most of the time the CPU uses a combination of instruction sets

 

the most basic part of the CPU which is the ALU uses RISC

 

the outer part of the CPU which is the control unit uses both RISC and CISC

 

all the instructions will have the 3 basic steps

 

first off will be fetch data

 

then decode data

 

once the CPU decoded the instructions it will execute

 

the last or optional step will be to store data (correct me on this)

Budget? Uses? Currency? Location? Operating System? Peripherals? Monitor? Use PCPartPicker wherever possible. 

Quote whom you're replying to, and set option to follow your topics. Or Else we can't see your reply.

 

Link to comment
https://linustechtips.com/topic/475471-help-me-understand/#findComment-6379379
Share on other sites

Link to post
Share on other sites

Most of the time the CPU uses a combination of instruction sets

 

the most basic part of the CPU which is the ALU uses RISC

 

the outer part of the CPU which is the control unit uses both RISC and CISC

 

all the instructions will have the 3 basic steps

 

first off will be fetch data

 

then decode data

 

once the CPU decoded the instructions it will execute

 

the last or optional step will be to store data (correct me on this)

I just did some reading up on this and I think I understand why the FPU shared between two cores was a bottleneck.

So as you said, the ALU is the most basic component of a CPU and an FPU also utilises an ALU, right? 

You were talking about how the processor works by fetch- decode - execute. So if there's only one FPU performing the binary calculations, both the cores will have to send a "request" to the FPU as it can't keep up, right? So one core sends a request, the FPU fetches the instruction, decodes it and then executes THEN handles the request of the second core. Am I understanding you here?

 

Having an FPU for each core would mean that there would be no wait time required because there just isn't another core waiting to execute its task. Is this correct?

Link to comment
https://linustechtips.com/topic/475471-help-me-understand/#findComment-6379486
Share on other sites

Link to post
Share on other sites

I just did some reading up on this and I think I understand why the FPU shared between two cores was a bottleneck.

So as you said, the ALU is the most basic component of a CPU and an FPU also utilises an ALU, right? 

You were talking about how the processor works by fetch- decode - execute. So if there's only one FPU performing the binary calculations, both the cores will have to send a "request" to the FPU as it can't keep up, right? So one core sends a request, the FPU fetches the instruction, decodes it and then executes THEN handles the request of the second core. Am I understanding you here?

 

Having an FPU for each core would mean that there would be no wait time required because there just isn't another core waiting to execute its task. Is this correct?

this is where my knowledge of CPUs work thou

 

AMD modules system is a different story

 

my knowledge was valid only with single core

Budget? Uses? Currency? Location? Operating System? Peripherals? Monitor? Use PCPartPicker wherever possible. 

Quote whom you're replying to, and set option to follow your topics. Or Else we can't see your reply.

 

Link to comment
https://linustechtips.com/topic/475471-help-me-understand/#findComment-6379512
Share on other sites

Link to post
Share on other sites

this is where my knowledge of CPUs work thou

 

AMD modules system is a different story

 

my knowledge was valid only with single core

Thank you. You were still helpful. 

Link to comment
https://linustechtips.com/topic/475471-help-me-understand/#findComment-6379586
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

×