top button
Flag Notify
    Connect to us
      Facebook Login
      Site Registration Why to Join

Facebook Login
Site Registration

Difference between synchronous and asynchronous interrupt ?

+4 votes
6,090 views

I am getting confused between trap and interrupt. As trap is software driven and interrupt is hardware originated. Every instruction of a program get executed in CPU then how trap and interrupt differs ? A detailed example can help out me. Thanks in advance.

posted Sep 29, 2013 by Neeraj Mishra

Share this question
Facebook Share Button Twitter Share Button Google+ Share Button LinkedIn Share Button Multiple Social Share Button

2 Answers

+1 vote

Interrupt is a very generic term. There are two types of interrupt occurs in system, one through software and another one through hardware. Suppose a programer has written such a statement in his/her program which causes interrupt in the system i.e called synchronous interrupt or software interrupt like division by 0. Another class of interrupt is generated in system due to hardware like I/O interrupt, Hard disk. Hardware interrupt comes under class of "asynchronous interrupt" like you pressed Ctrl-C.

answer Sep 29, 2013 by Vikram Singh
+1 vote

1.Synchronous Interrupts (also know on as software interrupts)
- Synchronous Interrupts are generated by CPU's control unit on facing some abnormal condition; these are also know as exception in Intel's terminology. These are interrupts which are generated by CPU itself either when CPU detects an abnormal condition or CPU executes some of the special instructions like 'int' or 'int3' etc.
2.Asynchronous Interrupts (also know as hardware interrupts)
- On other hand, Asynchronous Interrupts are those, which actually are generated by outside world (devices connected to CPU), As these interrupts can occur at any point of time, these are known as Asynchronous interrupts.

answer Oct 1, 2013 by Satyabrata Mahapatra
Similar Questions
+1 vote

I am maintaining a program in Python 2 and need to send it a Keyboard Interrupt to close it. Unfortunately, the program is used as a subprocess in a wrapper subprocess, and so I cannot just directly press CTL-C; I have to use a signal.
When I run the program "bare" (not in a subprocess), I have found that raising a SIGINT (kill -2) raises a Keyboard Interrupt in the program. But when I run the program in the wrapper process, kill -2 no longer has any effect (whether it is raised by the wrapper or externally).
Why is that the case? Does Pythons interpretation of SIGINT as a Keyboard Interrupt only obtain when the program is run in a terminal? Is there something else Im missing?

0 votes

Can someone please explain using any example ?

Contact Us
+91 9880187415
sales@queryhome.net
support@queryhome.net
#280, 3rd floor, 5th Main
6th Sector, HSR Layout
Bangalore-560102
Karnataka INDIA.
QUERY HOME
...