Solved

Linux, Interrupts

Posted on 2012-03-25
2
443 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 500 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

Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Zimbra on Amazon Linux help 7 113
php56-php-mcrypt for rhel7 php56 1 109
how to include conditional log rotate in liunx. 17 72
Redhat upgrade 1 48
Daily system administration tasks often require administrators to connect remote systems. But allowing these remote systems to accept passwords makes these systems vulnerable to the risk of brute-force password guessing attacks. Furthermore there ar…
I am a long time windows user and for me it is normal to have spaces in directory and file names. Changing to Linux I found myself frustrated when I moved my windows data over to my new Linux computer. The problem occurs when at the command line.…
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.:
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

733 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