Re: Preemptive linux
- From: Chris Friesen <cbf123@xxxxxxxxxxxxx>
- Date: Wed, 27 Sep 2006 11:33:55 -0600
Rafael Almeida wrote:
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.
Did you enable CONFIG_PREEMPT and recompile the kernel? It may not have been enbled by default.
> 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?
With the code as shown, there's no way for you to kill the task once you go into that loop. You need an exit condition.
That said, with CONFIG_PREEMPT I *think* you should still be able to do other stuff on the system--it would just always be running at 100% cpu.
Chris
.
- References:
- Preemptive linux
- From: Rafael Almeida
- Preemptive linux
- Prev by Date: Re: Preemptive linux
- Next by Date: Killing process started by system()?
- Previous by thread: Re: Preemptive linux
- Next by thread: Killing process started by system()?
- Index(es):
Relevant Pages
|