?
Solved

Linux, Interrupts

Posted on 2012-03-25
2
Medium Priority
?
456 Views
Last Modified: 2012-03-25
Could someone please give me a quick explanation of what an interrupt is, and how it relates to a networking device ?

Thanks
0
Comment
Question by:Los Angeles1
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 21

Expert Comment

by:CompProbSolv
ID: 37763686
First of all, there are hardware and software interrupts.  I'm presuming that you are asking about hardware interrupts.

My information is old, but I suspect that it is still relevant to current architecture.

From the early days of PCs, there were two ways to know when a hardware device wanted the CPUs attention: polling or interrupts.  Polling is similar to how you check to see if there is mail in your (physical) mailbox.  You go take a look out the window and see if there are letters sticking out.  This works really well for some types of information, especially those which are not time-sensitive.

Your telephone is a good example of something that is interrupt-driven.  If it were polled, you'd just answer the phone every once in a while just to see if someone was calling. Obviously, not very practical.  Instead, your phone issues an interrupt (rings) to let you know that you need to deal with it pretty promptly.

Network data is similar.  When a packet arrives on the cable, your computer needs to grab it before it is overrun by the next packet.  While network cards can have their own buffers to store the data, at some point they will be overrun and data will be lost.

When the data arrives, the network card will change the electrical state of the interrupt line (IRQ), which will signal to the Interrupt Controller that something needs to be dealt with.  The CPU will put its current work on hold, and "service the interrupt".  That would typically mean grabbing the data from the network card and putting it in a RAM buffer somewhere.  Once that is done, it may set some flags to note that there is data there and will tell the card that it got the data.  Then it will resume whatever it was doing before.
0
 
LVL 30

Accepted Solution

by:
Kerem ERSOY earned 2000 total points
ID: 37763688
Hi,

In a nutshell interrupt is a mechanism for CPU. When a device such as an ethernet adapter receives data it taps the CPU on the shoulder and it says it needs attention. When CPU gets the interrupt it saves whatever it does and goes to service the device.

In network adapter it means that there's an incoming  oan/or outgoing traffic which requires to be transmitted upper / lower levels of communication protocol. Simply when a network adapter receives adata it sends an interrupt to the CPU so that the CPU gets the data and sends it to the related application.

Just think that you have a Web Server and when someone connected the network requests a web page it reaches to the Network adapter. it generates an interrupt so that CPU takes the data to the Web Server through TCP/IP stack. Then CPU process the data through Web Server Code. And then puts the response back to the TCP/IP communication stack so that it is transferred to the Network adapter..

I hope this helps.

Cheers,
K.
0

Featured Post

Interactive Way of Training for the AWS CSA Exam

An interactive way of learning that will help you visualize core concepts so that you can be more effective when taking your AWS certification exam.  Built for students by a student to help them understand the concepts that they are being taught.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I. Introduction There's an interesting discussion going on now in an Experts Exchange Group — Attachments with no extension (http://www.experts-exchange.com/discussions/210281/Attachments-with-no-extension.html). This reminded me of questions tha…
In part one, we reviewed the prerequisites required for installing SQL Server vNext. In this part we will explore how to install Microsoft's SQL Server on Ubuntu 16.04.
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
Suggested Courses

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question