[LUGSB] Kernel related question
Mark Drago
markdrago at mail.com
Wed Apr 7 11:25:47 EDT 2004
Chip will likely be able to give you better answers than I'm going to
give you, but I'm fairly familiar with this stuff, so here it goes.
On Wed, 2004-04-07 at 10:38, Siddhartha Basu wrote:
> *Kernel Preemption : What it is supposed to do? I have the idea that is
> supposed to geared towards desktop performance. So, if you have a kernel
> with this enabled in a machine which is working as a server, does it
> degrade the performance. How much is it needed for overall desktop
> performance.
Preemption is what happens when a process is running, and one with
higher priority comes along and wants to run. In this case, the kernel
will "preemptively" interrupt the lower priority process and allow the
higher priority process to run. However, in the past, whenever code was
running inside of the kernel (system call, etc.) the process was not
able to be preempted. So, if the system was running a very low priority
process that was executing a system call, and you then start to use an
application, the system wouldn't be able to preempt the lower priority
process until it returned from the system call. When you enable "kernel
preemption", this limitation disappears. So, it is possible to
interrupt a low priority process running in the kernel with a higher
priority process. This leads into the next question...
> * Interactivity: I see it more often comes up during any kernel related
> discussion. What exactly does it mean? Does it mean to improve desktop
> performace, does it hurt the performance of a server.
Interactivity is just a way of describing how quickly the system will be
able to respond to an action. This action may be the user clicking on a
button, or a packet coming across the network, etc. By having a kernel
that is preemptible, the system will have better 'interactivity'. This
is the result of being able to interrupt a lower priority process
independent of whether it is executing inside the kernel or not. The
problem with interactivity is that it is indirectly proportional with
total throughput. Since there is some overhead with switching from
running one process to another, increased interactivity will result in
an increase in the number of context switches, and a drop in the overall
throughput of the system. This is one of the challenges in designing a
scheduler, balancing interactivity with throughput.
Considering all of this, I think that enabling 'preemptive kernel' on a
desktop system will result in a noticeable increase in performance, and
it should also help with performance on a server system. Having a
preemptive kernel makes sense in both cases. This comes from my taking
the undergraduate operating systems class at stony brook, and reading a
linux kernel book and a few articles on kernel preemption. I am by no
means an expert and hope that someone other than me will confirm and/or
deny my reply.
--Mark.
> -sidd
More information about the lugsb
mailing list