GeneralThis forum is for non-technical general discussion which can include both Linux and non-Linux topics. Have fun!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Started working on a script to compile the newer xorg (or scratch that idea and fuddle with the x11.SlackBuild), mesa, blah blah, as well as pondering if I should just go ahead and create an entire new directory under /usr (not a link) for xorg stuff.
Don't know why, but it has always bothered the living hell out of me having my console apps/docs/etc mixed in with my xorg apps/docs/etc...:/...
Why is it that the uname -a output for just about any recent kernel includes "PREEMPT"? I mean, isn't *every* Linux kernel pre-emptive multitasking now? Or the kernel of any modern PC operating system, for that matter.
It had to do with how the kernel deals with process scheduling. You see contrary to popular belief and keeping withen the relm of single core cpu for simplicity, a computer processor can actually only run one thing at a time. It does this sorta put this on hold run a bit of this program put it on hold run another bit from this other program, and does it so quickly that it gives us the illusion of being able to run multiple programs at once.
I am no expert by anymeans... I couldent program myself out of a box, but there is a wealth of info on it online. This is part of the o'reilly series on such maters http://oreilly.com/catalog/linuxkern...pter/ch10.html
This is the traditional Linux preemption model, geared towards
throughput. It will still provide good latencies most of the
time, but there are no guarantees and occasional longer delays
are possible.
Select this option if you are building a kernel for a server or
scientific/computation system, or if you want to maximize the
raw processing power of the kernel, irrespective of scheduling
latencies.
----------------------------
Voluntary Kernel Preemption (Desktop)
CONFIG_PREEMPT_VOLUNTARY:
This option reduces the latency of the kernel by adding more
"explicit preemption points" to the kernel code. These new
preemption points have been selected to reduce the maximum
latency of rescheduling, providing faster application reactions,
at the cost of slightly lower throughput.
This allows reaction to interactive events by allowing a
low priority process to voluntarily preempt itself even if it
is in kernel mode executing a system call. This allows
applications to run more 'smoothly' even when the system is
under load.
Select this if you are building a kernel for a desktop system.
-----------------------------
Preemptible Kernel (Low-Latency Desktop)
CONFIG_PREEMPT:
This option reduces the latency of the kernel by making
all kernel code (that is not executing in a critical section)
preemptible. This allows reaction to interactive events by
permitting a low priority process to be preempted involuntarily
even if it is in kernel mode executing a system call and would
otherwise not be about to reach a natural preemption point.
This allows applications to run more 'smoothly' even when the
system is under load, at the cost of slightly lower throughput
and a slight runtime overhead to kernel code.
Select this if you are building a kernel for a desktop or
embedded system with latency requirements in the milliseconds
range.
You see contrary to popular belief and keeping withen the relm of single core cpu for simplicity, a computer processor can actually only run one thing at a time. It does this sorta put this on hold run a bit of this program put it on hold run another bit from this other program, and does it so quickly that it gives us the illusion of being able to run multiple programs at once.
I was already aware of this, I was just a bit sketchy on the details. I found a decent site that does a fairly good job of explaining pre-emptive multitasking (and even goes a little bit into SMP). However, I take it as being a rather simplified explanation, and that the Linux kernel's scheduling methods are a bit more complex...?
Also, I think I should note that I've never written a single line of "bare metal" code in my life (unless you count Arduino sketches ), so what knowledge I do have is based on theory, rather than practice.
Distribution: M$ Windows / Debian / Ubuntu / DSL / many others
Posts: 2,339
Rep:
Quote:
Originally Posted by MrCode
I was already aware of this, I was just a bit sketchy on the details. I found a decent site that does a fairly good job of explaining pre-emptive multitasking (and even goes a little bit into SMP). However, I take it as being a rather simplified explanation, and that the Linux kernel's scheduling methods are a bit more complex...?
Also, I think I should note that I've never written a single line of "bare metal" code in my life (unless you count Arduino sketches ), so what knowledge I do have is based on theory, rather than practice.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.