Friday, June 24, 2005

Kernel - preemptive

mercied>I need help, further explaination on what is preemptive?

amb> mercied, as I understand, it allows kernel mode threads to be suspended when there is a higher priority task
amb> in other words preemption isn't limited to userspace

wli> 1-line summary: an attempt to honor timeslice expiry and priority preemption while in kernelspace

mercied> its the other word for process interrupt? am I right?

DrNick> Think of it this way: when running in userspace, the code can be preempted at any time the kernel feels like doing so
DrNick> However, when that userspace tasks makes a kernel call, normally the only way it can be scheduled away is if it voluntarily does so

DrNick> via explicit calls to schedule or wait primitives or copy_to/from_user
DrNick> CONFIG_PREEMPT makes it so that sometimes code running in kernelspace can be preempted non-voluntarily

mercied> :D thx!

DrNick> "sometimes" because preemption is disabled while code holds spinlocks and at other times, too

No comments: