How much should an average developer know about bare metal?

The other day, it seemed to me that I know almost nothing about the hardware that I expect to run my software. I was a developer for about 5 years, but I did not study the theory / design of equipment since I left the university. I don’t even build my own cars anymore, because, being rudely honest, I would prefer to pay the extra bucks and leave the Comp Sci ransom in the store for me.

Although it is important to have a good understanding of the basics of what is happening under the hood, it has abstracted so far away from us as developers, we really don't need to worry about the intricacies of Programmed I/O or Memory-Mapped I/O , etc. ,

Or are we?

Notice that I'm talking about your daily LOB designer here, not about loyal naked guys.

So, define the “average” how you will, but overall, how deep should a skilled programmer dive?

+4
source share
5 answers

It depends on how high your design is.

  • If you are developing embedded systems, this means a lot of hardware knowledge (close to the EE level).
    • If you are in some specialized area, such as low-level three-dimensional graphics programming for games, you should know all kinds of graphics cards.
    • If you are making web or desktop applications, there may not be many.

But in all developments, you probably should know the basics. For instance.

  • Where are the bottlenecks in von Neumann architecture.
    • How the processor cache works (important in multithreading).
    • How OS planning will differ from single-processor multiprocessor processors (again, it is important for multi-threading).
    • How IO works, and why, when you write a file, does not necessarily mean that the data is saved immediately.
    • How slow is IO and why are most database applications tied to IO.
    • Why is the network even slower and less reliable than IO (and even a wireless network).

On the other hand, I don’t think I know the specifics, like that which has an IO of memory with memory mapping, or knowing the difference between NAND flash and NOR flash is really important for the average developer * (desktop / web). Even knowing the architecture of a modern processor is likely to become science itself, seeing how complicated they are in recent years, not to mention the fact that the code emitted by modern compilers is becoming increasingly difficult to predict (a related article shows that it is now more difficult to outwit the compiler in optimization at a low level). It is like being an auto mechanic just a few decades ago, today not many people try to fix their cars themselves.

** The definition of "average" may vary. *

+9
source

Of course, you can do without knowing anything about the basic equipment. However, even knowing a little about, for example, how caches work and what operations are performed quickly and slowly on your specific target machine, you will be able to make design decisions much better when developing software.

In my personal note, I consider it a great satisfaction in understanding how the machine that I spend at least 10 hours a day at work;)

And again, why settle on average?

+3
source

It is very useful for me to understand the assembler language released by the compiler, C ++ in my case. This is very useful when considering issues such as optimizing and solving complex debugging problems.

+3
source

In many cases, you do not know what equipment will work in your program, so too much attention is paid to some specific details of one machine. Users can run your Win32 executable on a virtual machine on some 64Bit RISC equipment, who knows. If you don’t know the target equipment exactly, it is better to use the abstractions that the OS and standard libraries provide, and use them for their intended purpose. Trust the people who build the OS, compiler, libraries to do their job properly.

+2
source

OS developers do a great job of abstracting the main physical world. Their goal is to provide the average developer with a common interface for many hardware so that he can focus on his application and develop a portable, easier to maintain and able to optimize OS updates.

So, for the average developer doing the average application, I think it’s better not to ask too many questions about the hardware.

+1
source

All Articles