[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: interrupt&syscall
On Sun, Jan 21, 2001 at 11:40:07AM +0530, Sourav Sen wrote:
>
>
> >
> > You can no preempt a process running in kernel mode. The kernel
> > is not preemptive, yet. Note however that you also have boxes
> > with multiple cpu's, and that you require more locking there.
>
> Does this mean that when I do a system call and the network
> card send an interrupt, it waits until the syscall returns?
No, the interrupt will be processed from the moment the interrupt
priority level allows it. You can only be interupted by an
interupt of a higher priority. If you set the priority level to
the highest value, you can't be interupted.
A context switch can always happen when the process is running in
user mode (because of a timer int), or when you return from
kernel mode to user mode (return from a syscall).
Note that system calls can sleep, because they're waiting on an
event. At that time there can also be a context switch.
Kurt
-
Kernelnewbies: Help each other learn about the Linux kernel.
Archive: http://mail.nl.linux.org/
IRC Channel: irc.openprojects.net / #kernelnewbies
Web Page: http://www.surriel.com/kernelnewbies.shtml