Jamie *nix forums beginner
Joined: 09 Apr 2005
Posts: 15
|
Posted: Fri Jul 21, 2006 6:45 am Post subject:
Software interrupts
|
|
|
I am having some trouble with understanding software interrupts verses
system calls in the freebsd kernel.
As I understand it, making a system call actually causes a hardware
trap because you are calling 0x80.
But I got the impression that software traps did not occur in hardware.
Rather, that there was an array of signals for a process that is checked
when the process is leaving kernel mode, and if the "flag" is set, then
some code is executed before returning to the user mode for the process.
But according to a book I'm studying "Design and Implementation of the
FreeBSD Operating System", there is a function called trap() that is
called whenever there is a hardware trap or a software initiated trap
other than system calls (p53).
This seems to say that there is a context switch when there is a
software interrupt, the hardware saves states, and the registers are all
saved, etc, even for a software interrupt such as requests for network
processing.
Is that correct?
- Jamie
The Moon is Waning Crescent (16% of Full) |
|