⚙️
शुरुआती·8 min पढ़ने का समय

CPU क्या होता है?

आधुनिक प्रोसेसर कैसे काम करते हैं — कोर, थ्रेड, कैश और इंस्ट्रक्शन पाइपलाइन।

The Central Processing Unit (CPU) is the primary processor in a computer — the component that executes program instructions. Everything you do on a computer, from opening a browser to running a game, ultimately comes down to the CPU fetching instructions from memory and executing them, billions of times per second.

🌐विस्तृत तकनीकी सामग्री अंग्रेज़ी में है। पूर्ण अंग्रेज़ी संस्करण के लिए यहाँ क्लिक करें।

Cores and Threads

Early CPUs had a single core — one execution unit. Modern CPUs have multiple cores, each of which can run instructions independently and in parallel. A quad-core CPU can genuinely run four programs simultaneously, one per core. Intel's Hyper-Threading (and AMD's SMT) adds a second hardware thread per core, letting the OS schedule two threads on the same core by sharing execution units.

  • ▸P-cores (Performance) run demanding single-threaded tasks; E-cores (Efficiency) handle background work at lower power.
  • ▸Clock speed (GHz) measures how many cycles per second the CPU executes; more cycles = more work, all else equal.
  • ▸Modern CPUs boost clock speed dynamically based on thermal headroom — Intel Turbo Boost, AMD Precision Boost.

Cache Memory

Fetching data from main RAM takes hundreds of nanoseconds — far too slow for a CPU running at 5 GHz. Cache memory is high-speed SRAM embedded on the CPU die, acting as a staging area for frequently used data and instructions.

LevelLatencyTypical SizeShared?
L1~1–4 ns32–128 KB per coreNo
L2~4–12 ns0.5–4 MB per coreNo
L3~10–40 ns8–192 MB totalYes (all cores)
RAM~60–100 ns8–128 GB systemYes

The Instruction Pipeline

Modern CPUs use a pipeline — breaking instruction execution into stages (Fetch → Decode → Execute → Write Back) and processing multiple instructions simultaneously at different stages, like an assembly line. Superscalar CPUs have multiple execution units so they can retire more than one instruction per clock cycle.

  • ▸IPC (Instructions Per Clock) measures how many instructions a CPU completes each cycle. Modern CPUs target 4–6+ IPC.
  • ▸Branch prediction guesses which way an if/else branch will go so the pipeline can speculatively execute ahead.

CPU Performance: What Actually Matters

Raw clock speed is not the whole story. A CPU running at 4.0 GHz with better IPC can outperform one at 5.0 GHz with worse IPC. Memory bandwidth and latency matter for data-intensive workloads.

नोट: TDP (Thermal Design Power) specifies the maximum heat a cooler must handle under typical use.

टैग

CPUHardware basicsCoresCacheIPC