lkml.org 
[lkml]   [2000]   [Feb]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Linux kernerl preemptive ??
On Tue, Feb 29, 2000 at 05:14:46AM +0530, Aneesh Kumar K.V wrote:
> Hai ,
> Can you suggest me some url which discuss all these things .
> Actually i didn't get the point . You say kernel is not preemptive but it
> can yield to other process when it is waiting for some resources . Well
> then why it is not made preemptive . Is SMP used to multiprocessor machine
> . Do it have anything to do with preemtion .

Others may have URLs, I don't.

- "SMP" = "Symmetric Multi Processing"
(Or in case of Linux: "Symmetric Multi Penguin" -- a joke)

- Pre-emption is a thing where executing thread is involuntarily
stopped from doing whatever it was doing, and processor is given
to another thread. Linux kernel DOES NOT DO THAT INTERNALLY.
Well, there is a sort of hierarchy of pre-emptions:
- user threads (+ kernel threads for user syscalls)
- scheduling in between user threads
- interrupt processing

- Only pre-emption what there is, does happen in between compute-
bound user processes when process' timeslice has completed.

- Kernel threads can voluntarily YIELD their processor to other
tasks by means of waiting for some resource, or executing
explicite schedule() call.

- As to why the kernel isn't made internally pre-emptive; doing
such a thing is *difficult*, very difficult.

System would need to be rewritten to allow internal execution
stopped at any point, and having other processors/threads trample
on incomplete datasets at any point...
(Multiprocessor support requires sort of this behaviour anyway,
and that is why there are various spinlocks all over the place..)

> regards
> aneesh

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:56    [W:0.101 / U:0.080 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site