Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


distinguish between interrupts and exceptions?

Answers were Sorted based on User's Feedback



distinguish between interrupts and exceptions?..

Answer / sairam kulkarni

Interrupts and exceptions both alter the program flow. The
difference
between the two is that interrupts are used to handle
external events
(serial ports, keyboard) and exceptions are used to handle
instruction
faults, (division by zero, undefined opcode).

Interrupts are handled by the processor after finishing the
current
instruction. If it finds a signal on its interrupt pin, it
will look up
the address of the interrupt handler in the interrupt table
and pass
that routine control. After returning from the interrupt
handler
routine, it will resume program execution at the
instruction after the
interrupted instruction.

Exceptions on the other hand are divided into three kinds.
These are
Faults, Traps and Aborts. Faults are detected and serviced
by the
processor before the faulting instructions. Traps are
serviced after
the instruction causing the trap. User defined interrupts
go into this
category and can be said to be traps; this includes the MS-
DOS INT 21h
software interrupt, for example. Aborts are used only to
signal severe
system problems, when operation is no longer possible.

Is This Answer Correct ?    52 Yes 5 No

distinguish between interrupts and exceptions?..

Answer / santosh

For example, when you are eating dinner at home, suddenly the phone rings, you have to pick up the phone, because it could be an emergency, that is an interrupt. For the exception, it is more like when you are eating, you suddenly find half of dead cockroach in you food, errr~~~~~. After answering the phone or vomiting, we have to go back to our normal life anyway. Hopefully you still have appetite after that "exception".

In a nut shell, interrupts and exceptions both stop the processor's processing flow and force it to do something else and after that it will go back to the normal flow. The difference between interrupts and exceptions is interrupts are triggered by external source, like hardwares or more specific, the keyboard input, system timer etc, but exceptions are caused by the execution of instruction under predefined condition, like divide by zero fault, and there are exceptions for exceptions :), like INT 3 is an exception can be used by user tasks for debuging intentionally.

Is This Answer Correct ?    21 Yes 1 No

Post New Answer

More Unix Commands Interview Questions

what will be the output of ls ~/..

27 Answers   ABC,


What is the difference between udp and tcp?

2 Answers   HCL, TCS,


Where can I get the free download of Unix by Yeswant Kanetkar?

5 Answers  


What is the protocol for PING command?

1 Answers   IBM,


which command is used to stop a running process in unix?

8 Answers  


How can you copy files or directories?

1 Answers  


1-how will you display a file whose name is starting with '- '? 2-how will you add a patten at end of every line in vi editor?

7 Answers  


What is in grep command?

0 Answers  


How do I find previous commands in unix?

0 Answers  


what does a process mean?

5 Answers   Infosys,


what is the use of uniq commmand?

8 Answers  


In vi editor how do you execute unix commands?

10 Answers  


Categories