Hello,
Vijay Ram Chitrapu (RCVIJAYD) wrote:
Can anyone help me understand what Software Interrupts are?
Any links or examples are welcomed..
Basically, on x86 architecture, you can have three sources of interruption :
- the processor himself, that generates "exceptions", such as Page
Fault, General Protection Fault, Divide by Zero and so on. On IA32
architecture, there are 32 exceptions ;
- the hardware, such as network cards, sound cards, hard drives and
much more generates IRQs to signal an event (arrival of a network
packet, acknowledgment of a DMA transfer, etc.) ;
- the software which, using the «int» instruction, explicitly
generates a so-called «software interrupt».
So, the software interrupts are interrupts that are generated explicitly
by the code running on the processor. The typical usage of such
interrupts is to implement syscalls : when the code is running in user
(non privileged) mode, it cannot call kernel code directly. In order to
switch to kernel (privileged) mode, a software interrupt is used (at
least on x86).
Don't hesitate to ask for more details. Others, don't hesitate to
correct me if I'm wrong.
Sincerly,
Thomas
--
Thomas Petazzoni
thomas.petazzoni@xxxxxxxx
--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive: http://mail.nl.linux.org/kernelnewbies/
FAQ: http://kernelnewbies.org/faq/