[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: interrupt&syscall



On Sun, 21 Jan 2001, 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?

Hi Sourav, by "pre-emptible", Kurt means that the routine cannot have the
CPU taken away from it "permanently". Unless interrupts are explicitly
disabled by the kernel code, any system call will still be interrupted by
a hardware interrupt (most notably, the timer interrupt), and CPU will
temporarily be transferred to that interrupt routine and the associated
code. However, the CPU is guaranteed to return to the system call code
after processing of the interrupt (and bottom halves etc.).

I have a small prototype paper describing this at :

http://www.movement.uklinux.net/schedule.html

Eventually I intend to add it to http://www.kernelnewbies.org/

I would appreciate your comments on readability etc.

thanks
john

-- 
"...one of the main causes of the fall of the Roman Empire was that,
lacking zero, they had no way to indicate successful termination of
their C programs."
	- Robert Firth

-
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