[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: interrupt&syscall
On Sat, Jan 20, 2001 at 03:51:33PM +0530, Sourav Sen wrote:
>
> Hi,
> I have the following doubts : while in a system call and when
> holding kernel_lock or a semaphore(down(..)), if an interrupt comes what
> will happen? the task will be preempted or the interrupt will not be
> handled? WRT x86, it has only cli and sti, so how the concept of
> "raising the interrupt priority level" is handled? also what stack is used
> when in interrupt?
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.
Interupts will always use the kernel stack of the currently
running process.
If you raising the interrupt priority level, the interrupt has to
wait until you lower it again.
Hope this helps.
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