Preemptive linux
- From: Rafael Almeida <rafaelc@xxxxxxxxxxx>
- Date: Wed, 27 Sep 2006 02:31:22 -0300
Hello,
I've been reading a book about operating systems (operating systems
concepts, seventh edition) and the author says "A preemptive kernel
allows a process to be preempted while it is running in kernel mode.
(...) Prior to Linux 2.6, the Linux kernel was nonpreemptive as well.
However, with the release of the 2.6 kernel, Linux changed to the
preemptive model."
I've written a system call like this:
int sys_foo(void)
{
while (1);
return 0;
}
When I called it, however, the system hang and I was not able to do
anything besides restarting it. Wouldn't that mean that the kernel is
actually nonpreemptive, as if it were preemptive I would be able to get
back to the shell and kill the process?
I've called my syscall using that _syscall0 macro on sys/syscall.h. I
would post the whole thing here but I don't have access to the code
right now, but I think what I've said is enough to everyone to
understand what I've done.
I used linux 2.6.17-gentoo-r7 for the experiment.
PS: Thank you to everyone who answered my post asking for suggestions
for changing stuff in the kernel.
[]'s
Rafael
.
- Follow-Ups:
- Re: Preemptive linux
- From: Chris Friesen
- Re: Preemptive linux
- From: Alexander Krizhanovsky
- Re: Preemptive linux
- From: Milind Dumbare
- Re: Preemptive linux
- Prev by Date: Re: .ptx files
- Next by Date: Re: Preemptive linux
- Previous by thread: .ptx files
- Next by thread: Re: Preemptive linux
- Index(es):
Relevant Pages
|