What is the average lifespan of a CPU?
Usage of a CPU does result in wear at the atomic/electronic level.
The actual lifespan of the silicon transistors of a consumer CPU is typically in the range of 20-30 years before there is a failure, not 3-4years. It is asssumed by then that the item would be obsolete.
How does Intel/AMD know if there's no way to test a chip for 30years? It is tested under load under higher than normal conditions (heat voltage, clock) and the variables and failure data are then extrapolated and calculated backwards for typical use.
Of course there are other failure points such as the chip packaging wires and things of that nature, but low decades would be a fair assumption.
3-4 years is more of the practical obsolescence of the product due to Moore's law and all that.
Source: Masters degree in EE, and learned in a course on chip failure design.
Your powersupply, CPU fan and hard disk will all die long before your CPU. They're the three parts likely to fail. CPUs aren't that well known for failing.
Also, it's a very very very rare computer that is used 100% 24x7.
I have recently decommissioned a server that was nine years old and was perfectly usable, if slow by today's standards.
Unless it overheats, and modern CPUs have thermal cut-offs that will try not allow that (by simply shutting off or by throttling their performance when the heat hits certain limits), a CPU is unlikely to die prematurely.
Of course if you have mucked about with the clock and voltages you might harm the CPU in ways that will give it an early death, but that is a known risk you take in such cases.
If running a CPU at full load 24/7, its fan and other cooling arrangements are going to be under as much stress as they will ever be so this could have an impact. If the fan fails then the CPU may overheat so fast that any thermal cut-off might have time to trip before it is too late as the temperature rockets up.
Typically the CPU is one of the most reliable parts of the PC. You stand a better chance of a failure of the CPU's fan, the system powersupply, the hard drive, or the motherboard before the CPU fails.
That being said, I recently had a string of CPU "failures" a few months back. We were running Intel Celerons in a production environment for a period of several years. I'm going to guess around 3-4 years.
I say "failures" in quotes because none of them ever actually DIED to the point where they system wouldn't boot.
One started doing "bad math", one started running REALLY HOT (so we took it out before it died), and one would boot up perfectly normal except that the screen display would eventually be whacked out and display random characters, etc. That one was the most interesting one as I've never seen anything quite like it in all my career. At first I blamed the mobo and we replaced it with an identical one. It wasn't the mobo... it was definitely the CPU as we put that same CPU in three identical mobos and got the same problem in all three. I have no explanation for it.
So, while its unlikely to experience CPU failure... it CAN and DOES happen. Just remember, in most cases... (at least in my experience) its usually one of the LAST things to go.
I have seen countless old systems still running perfectly fine after years and years and years.