(When) Does hardware, especially the CPU(s), deliver wrong results?

℡╲_俬逩灬. 提交于 2019-12-25 04:39:13

问题


What I'm talking about is: Is it possible that under certain circumstances the CPU "buggs" and suddenly responses 1+1=2?

  • In which parts of the computer can that happen (HDD, RAM, Mainboard)?
  • What could be the causes? Bad quality? Overheating?
  • Does that even happen? When yes, how frequently?

  • If everything is okay with the CPU (not a single fault in production, good temperature), can that still happen sometimes?

  • What would be the results of, let's say one to three wrong computations?

This is programming related as it would be nice to know if you can even rely on the hardware to return the right results.


回答1:


It can happen in all hardware; it happens quite often in RAM chips. There are mechanisms to detect and correct such errors, but in regards to RAM, only in the more expensive ECC chips. See Wikipedia's article on RAM and Error Correction

Also interesting is the article on Error Detection and Correction in general.




回答2:


One example: http://en.wikipedia.org/wiki/Pentium_FDIV_bug




回答3:


What I'm talking about is: Is it possible that under certain circumstances the CPU "buggs" and suddenly responses 1+1=2?

Yes

In which parts of the computer can that happen (HDD, RAM, Mainboard)?

All of them

What could be the causes? Bad quality? Overheating?

The most common cause is overclocking. Less common causes include faulty hardware.

If everything is okay with the CPU (not a single fault in production, good temperature), can that still happen sometimes?

It can be a ram problem like I said above, or really anything.

What would be the results of, let's say one to three wrong computations?

I don't understand this question.. You mean what would happen to the program? It would probably segfault but impossible to say. You mean what would 1+1 result into? Impossible to say. You mean what would happen if 1 in 3 computations were to fail on average? The computer wouldn't even boot.




回答4:


Well first you need to find an Computer Engineer who thinks that 1+1=2 is a bug and that its a hardware problem which needs to be fixed.

@Andreas Bonini, Midhat and Pekka: In such incidences it would be highly recommended to take a maths course on April Fool's day.




回答5:


Andrew Appel had a great demo a few years ago where he started a lecture by lighting a 100W bulb under a PC running Java. Within 20 minutes there were enough memory errors that he could exploit one to crack the Java virtual machine and take it over.

Cool your hardware!



来源:https://stackoverflow.com/questions/2566043/when-does-hardware-especially-the-cpus-deliver-wrong-results

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!