DEV Community

Yordi Verkroost
Yordi Verkroost

Posted on

Random Computer Terms: System Management Interrupt (SMI)

The developments in the field of Computer Science go fast. So fast actually, that you should always be learning new things. There is no other choice than to become a lifelong learner. So let's get after it and discuss one term out of the huge list of computer- and programming terms each week! This week's term is System Management Interrupt (SMI).

Okay, I have to do it. I can't help but think about System Management Interrupts outside of computers. In the world of company- or people management, an SMI could be something like this:

Management: "Could we please build feature X? It's very important for customer Y."
Development: "Sure, that's fine. We have thought about it with the team and we are going to build it in way Z."
Management: "No, no, that's not how it should be. You should instead think about this problem like...

System Management Interrupt occurred.

😂

Oh yes, our developer life would be so much better. We could finally do whatever we want without management interruptions calling us back.

No, just kidding, we do need management in our lives. Maybe.

Anyway, back to the actual topic. Let's see what an SMI actually is by looking at its definition:

System management interrupts (SMIs) are used to offer extended functionality, such as legacy hardware device emulation. They can also be used for system management tasks. SMIs are similar to NMIs in that they use a special electrical signaling line directly into the CPU, and are generally not able to be masked.
(source)

There we go. The source page explains the definition furhter with an example. Suppose you have a computer that doesn't have support for floppy disks. That's a reasonable assumption nowadays. That might be a bad thing for you because you have that awesome game on floppy disk that you want to play RIGHT NOW. In that case, the "legacy hardware device emulation" comes in handy. Think of his device emulation as an adapter around the floppy disk. Your computer has no clue on how to talk to the floppy disk, but it does know how to talk to the adapter. The adapter then knows how to translate the request from the computer to a request for the floppy disk. On the trip back, it translates instructions into something the computer understands. Cool, that's a win-win situation. A happy computer that can talk to the floppy disk, and a happy you who can still play that awesome game!

Another part of the SMI is the "signaling line directly into the CPU". This part of the definition brings another term into play: System Management Mode (SMM). Think of SMM as a tool that lets you operate on the hardware components of your computer. To get into this tool while the operating system is running, one uses an SMI. This is handy for developers that need access to the computer's hardware from time to time. For example, when the computer is idle for a certain amount of time, the system sends an SMI. This results in putting various hardware components into a sleep-state and save energy.

The last thing to know about SMIs and SMMs is how to get into and out of the SMM. We kind of already know how to get into the SMM: by sending an SMI. Because the CPU can only do one thing at the time, we need to have a place where we can store the current state of the CPU. This is important. Without this, we have no way of knowing where to continue after finishing the SMM instructions. When entering the SMM, it uses part of the computer's memory (RAM) to store the current state of the CPU.
The CPU retrieves this state from the RAM when the SMM finishes. Now the computer can continue where it left off.

These are - of course - the basics of SMIs and their relation to SMMs. Feel free to search for more information on your own. And of course, discuss your findings in the comments section below.

The Random Computer Term that we will discuss next time is: Bandwidth.

Discussion (0)