distinguish between interrupts and exceptions?

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Name the unix command to find how many days the server has been up.

605


What is the functionality of a top command?

628


What does #!/ Bin sh do?

591


Which command can you use to find the currently running process in unix server?

586


How many unix commands are there?

629






What is updatedb?

586


Which unix command to make a new directory?

592


How do you repeat a command in terminal?

591


What happens when we execute a unix command?

600


Explain the steps that a shell follows while processing a command.

683


Which command is used to copy files?

556


What is the use of sed command in unix?

601


What is the unix command to confirm a remote host is alive or not?

583


Which command is used to find whether the system is 32 bit or 64 bit?

631


What is awk command used for?

602