1
$\begingroup$

Most of you know this diagram. If this diagram is true, all software is free to not know the levels lower than ISA. But it's not true. Softwares like performance-critical programs or system softwares like OS and compilers, are often forced to understand not only ISA but also microarchitecture.

If so, what about the levels lower than microarchitecture? Is it 100% sure to say the levels lower than uArch aren't require to be understand by softwares or programmers?

$\endgroup$
1
  • $\begingroup$ Not if you are trying to mitigate Spectre! $\endgroup$
    – user20574
    Commented Nov 20, 2018 at 4:34

3 Answers 3

4
$\begingroup$

Nothing is 100% sure in life.

Abstractions are rarely perfect; they can be leaky. Nonetheless, just because developers at higher levels sometimes need to know about lower layers doesn't mean they always do, or usually do; and it doesn't mean the abstraction is useless.

Yes, there are cases where it is helpful to know about even lower levels of the architecture. For instance, cold boot attacks and the row hammer attack are made possible by a property of the physics of DRAM cells, so if you want to analyze the security of a system against that specific threat model, you might need to know about things at the level of devices and physics. These cases are the exception rather than the norm, but they do exist and are occasionally relevant.

$\endgroup$
1
$\begingroup$

I had the pleasure once to debug a problem that happened if the user put their computer to sleep and switched it on again after 40 to 50 seconds. Less than 40 or more than 50 seconds, and the problem wouldn't happen. (The 40 or 50 seconds were on the hardware that I used, the times might have been different on other hardware).

This was caused by memory cells keeping their data for a while while the computer was put to sleep, and eventually losing it. After 50 seconds, everything was gone and the software handled that fine. After 40 seconds, only some cells lost their data. Enough cells had the old data to convince the software to continue assuming it had valid data, but enough cells had lost their data to make things crash.

So yes, sometimes you need to go below the microarchiteture level. And as D.W. said, attackers may go below that level, and then a defense must go below that level as well. (I heard of attacks against Java Virtual Machines that basically consisted of flipping a small number of random bits using radiation. Plus a lot of complicated details, but the main attack was using radiation).

$\endgroup$
1
-1
$\begingroup$

I develop high-optimized (mostly compression) algorithms and use micro-architecture knowledge every day. It allows to make algorithms 10-100x faster compared to naive variants. Here is how you can learn to this level of knowledge:

What are the best resources (book, thesis, and academia papers) for one to become better at low-level computing using the C++ language?

$\endgroup$
1
  • $\begingroup$ The question is asking about levels lower than the microarchitecture level. $\endgroup$ Commented Jul 17, 2018 at 14:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.