Slashdot Mirror


Preemptible Linux Kernel: Interviews and Info

An anonymous submitter sends: "MontaVista and Robert Love are developing a patch for the Linux kernel to make it fully preemptible. Lots of users are involved, and tests show huge reductions in latency. Robert's kernel patches are here. Finally, an interview with Robert, on preemption and more."

238 comments

  1. Wow! by Free+Bird · · Score: 1, Interesting

    Cool! I really hope this'll make it into the official kernel, hopefully even 2.4 (though I doubt so not that 2.5 has been started).

  2. So will that make Linux a superior audio platform? by geekplus · · Score: 3, Interesting

    The reductions in latency -- would that include the type of latency that plagues real-time audio applications like sound-on-sound recording?

  3. Public Service Announcement from Brokaw & Torv by waldoj · · Score: 5, Funny

    We're sorry, but tonight's "Linux" will not be aired. Normally you would find 2.4.12 or 2.4.13-pre2 on Sunday nights, but not this evening. Now that Linux is fully preemptible, NBC will be airing a four-hour music-and-ice-skating tribute to Bill Gates.

    We apologize for any inconvenience, and for the reduced uptime. Enjoy the show.

  4. Re:So will that make Linux a superior audio platfo by keesh · · Score: 1

    Nope. Decent sound-on-sound recording uses pretty large buffers to get around that sort of problem.

  5. Finally.. by Renraku · · Score: 2, Interesting

    You'd think this would have been one of the first few 'features' of the Linux core. If the latency were high, it would screw programs and things that rely on low latencies to compute. Better late than never.

    --
    Job? I don't have time to get a job! Who will sit around and bitch about being broke and unemployed then?
  6. Preempt Patches in Kernel by terrabit · · Score: 1, Informative

    Does anyone think that this will ever make it into the kernel? It seems that Linus does not like this because it cures the symptons of latency in the kernel instead of the real problems.

    1. Re:Preempt Patches in Kernel by Anonymous Coward · · Score: 0

      ...flaimbait?...love the smell of moderators on crack

    2. Re:Preempt Patches in Kernel by entrox · · Score: 1

      Why was this modded 'flamebait' ?

      The poster raises a valid point which reflects Linus' attitude pretty good. IIRC Linus himself said, that they should rather fix the CAUSE of those latencies instead of the symptoms. This is one of the reasons, why Linux is against kernel debuggers. They tend to lure the coder into fixing symptons on the surface instead of perhaps rethinking the design (off by one errors are an example).

      --
      -- The plural of 'anecdote' is not 'data'.
    3. Re:Preempt Patches in Kernel by Anonymous Coward · · Score: 0

      Seems like I am only allowed to moderate it as "underrated" once :(

      Sorry

    4. Re:Preempt Patches in Kernel by Thatman311 · · Score: 1

      Uh? Why would he be against kernel debuggers? A kernel debugger is used to debug the kernel so how in other words do you debug a problem when you are developing new features that sit in the kernel or if you need to try to debug a problem that you see in the kernel? Do you have any sources on this statement cause I would love to read it.

      --
      Silly Rabbit...Sig's are for kids.
    5. Re:Preempt Patches in Kernel by entrox · · Score: 1

      Here's what I found on the kernel cousins:

      http://kt.zork.net/kernel-traffic/kt20001002_87. ht ml#4

      --
      -- The plural of 'anecdote' is not 'data'.
    6. Re:Preempt Patches in Kernel by GGardner · · Score: 4, Interesting

      Linus himself said, that they should rather fix the CAUSE of those latencies instead of the symptoms.
      Isn't that like saying that you'd rather fix all buggy applications instead of providing a protected memory environment?

    7. Re:Preempt Patches in Kernel by richie123 · · Score: 2, Insightful

      No, I thinks its more like Linux is saying he would rather make Linux faster, than make it feel faster.

    8. Re:Preempt Patches in Kernel by Anonymous Coward · · Score: 0

      Yes, actually, if that could be achieved, then the whole protected memory subsystem (the division between kernal space and user space) could be eliminated, along with the expensive transitions back and forth.

      I've talked with someone on IRC about a year ago that was actually going to try an implement something like this, writing the applications in a "safe" language (LISP in this case), along with a compilier.
      Sounds like a good idea to me, although one would have to have something like MS's driver signing, to cryptographically sign applications as "safe", to prevent nefarious trojan apps from hacking into "kernel" space, since there wouldn't be any protection.

    9. Re:Preempt Patches in Kernel by listen · · Score: 1

      Hm, strange.

      I'm attracted to almost exactly the opposite
      idea - capability systems. I really can't be arsed
      to explain them to you... but effectively the
      idea is to cut everything into smaller and smaller protection domains. I really don't like the idea of trusting the code correctness of a lisp or haskell compiler for my system security.
      In fact, I don't like the idea of trusting anything. See www.eros-os.org, and www.caplore.com.

      BTW the signing thing as sole security mechanism is really really insecure. It provides a false sense of security... as it is very likely that at least some key you trust WILL be leaked. So you need traditional measures to limit the damage. In the case of eros, a bad sound driver could maybe record a short amount of audio and distort it, and play it back. And nothing else. Under your system, it could send every file on your system to the attacker, plant child porn and terrorist plans on your system, and contact the FBI to screw your ass. In fact, even a bad image editing plugin could do this - just as it can under windows and linux today.

      Re performance - hardware is designed for context switching nowadays. To not use it is to throw away features for no gain.

      Rob

  7. Hmm by drinkypoo · · Score: 3, Interesting
    I thought the Slack 2.0 release had a 1.1 kernel.

    I'm wondering about this paragraph:

    We had to modify the interrupt code in entry.S to prevent some situations and to allow preemption on return from an interrupt handler. However, we can't preempt within critical regions for the same reason we can't allow concurrency within them with SMP -- so we prevent preemption while holding a spinlock. The bottom half handler and scheduler were also modified to prevent preemption while they are executing.

    Can anyone give a nice layman's description of what he's talking about here?

    --
    "You're right," Fisheye says. "I should have set it on 'whip' or 'chop.'"
    1. Re:Hmm by Anonymous Coward · · Score: 1, Informative

      If the kernel is preventing the same piece of code from running on more than one processor (by acquiring a spinlock), then it is also preventing the code from being preempted.

    2. Re:Hmm by selectspec · · Score: 5, Informative

      The interrupt handlers can't allow premption during the context switch of an interrupt because the registers are intransit. Basically, you can't have an interrupt while your in the process of any kind of context switch otherwise you're never sure what registers you were able to flush to and from the CPU to the stack.

      Critical Sections (such as access to the IP stack or I/O queues) have to be protected. With the advent of multi-processor systems under the SMP scheme, there is already considerable locking within the kernel to synchronize access of critical resources between processors. Critical regions also need to be protected from interrupt concurrent access as well.

      Bottom Half handlers generaly are fast track implementations to quickly deal with the interrupts. To avoid concurrency collisions of reasources used within the bottom half handlers, interrupts (for that particular handler) must be disabled during the handler's execution.

      All in all, this is basic non-preemptive stuff. What I don't understand is that this strategy that he is defining is a textbook NON-premtive approach to kernel design. I'm not too sure where he gets off claiming that the kernel is fully-preemptive here.

      --

      Someone you trust is one of us.

    3. Re:Hmm by Anonymous Coward · · Score: 5, Funny

      Only on slashdot would "IP stack", "I/O queues", "interrupt concurrent access" and "SMP" be considered laymans terms.

    4. Re:Hmm by sagei · · Score: 5, Informative

      I originally felt I should stay out of any discussion here, but I want to answer some of these questions and clear some of this stuff up. To be honest, it is a little embarrassing having everyone read and comment on the interview. :)

      Bottom Half handlers generaly are fast track implementations to quickly deal with the interrupts. To avoid concurrency collisions of reasources used within the bottom half handlers, interrupts (for that particular handler) must be disabled during the handler's execution.

      Interrupts, even just the in question, are not disabled during a bottom half, at least in general. The reason we can't preempt bottom halves is that they are guaranteed to be serialized w.r.t CPUs (ie a given BH runs on only one CPU at a time). Because of this, the BHs are designed without a regard reentrancy. So we can't preempt them.

      All in all, this is basic non-preemptive stuff. What I don't understand is that this strategy that he is defining is a textbook NON-premtive approach to kernel design. I'm not too sure where he gets off claiming that the kernel is fully-preemptive here.

      Hardly. Would you say an SMP system is not SMP if it is non-concurrent inside critical sections? No, you wouldn't, and this is the same situation we have here with preemption. We can't preempt inside critical regions. We have concurrency and reentrancy concerns, just like SMP does. We also can't preempt inside interrupt handlers or bh's because they aren't designed to be preempted (nor would you want to interrupt the top half of an interrupt, anyhow).

      The current kernel is not preemptive _anywhere_. The only way, in fact, kernel code ever yields execution is if it explicitly does so or returns. Since with the preempt-kernel patch we can now preempt in 90% of the kernel, I think its safe to say we have a preemptible kernel now.

      --

      Robert Love

    5. Re:Hmm by sagei · · Score: 4, Informative

      I thought the Slack 2.0 release had a 1.1 kernel.

      It could of, I just seem to remember a 1.0 kernel.

      Can anyone give a nice layman's description of what he is talking about here?

      Basically I am explaining the modifications to the kernel we made in order to make it preemptible. To try to put it more for the layman, besides just allowing the kernel to preempt itself as needed, we had to prevent some certain situations from being preempted. This is the same situation with SMP. We use SMP's locks to disallow preemption, for concerns of concurrency and reentrancy. We can't preempt during interrupt or BH handling because those things are not designed for concurrency, either.

      To sum it up, we have to prevent preemption in some situations. Those situations are: while locks are held, while handling interrupts and bottom halves, and while inside the scheduler itself.

      --

      Robert Love

    6. Re:Hmm by Anonymous Coward · · Score: 0

      "It could of, I just seem to remember a 1.0 kernel."

      could HAVE, not could of.
      you are probably thinking of could've, which is a short form of could have.

    7. Re:Hmm by selectspec · · Score: 3

      I agree with Robert here, and give him full kudos on his work, and appriciate his clarifications. We should all support his work with MontaVista. I apologize as my comments were hastely put together and unfairly characterized this project (which I wholeheartedly think is cool!). I would agree that the kernel with this patch is preemptive (just not "fully" preemptive however). I realize after reading my original comments that I should have choosen some better wording! These guys have done some kick ass work, and I'm sure that it was a considerable amount of work.

      -Pete

      --

      Someone you trust is one of us.

    8. Re:Hmm by Alsee · · Score: 1

      Uh oh, I've been reading too much Intercal. When I saw this:

      we have to prevent preemption in some situations.

      The first thing I thought of was:

      Please abstain from preempting

      Aaaaahhhhhh!!!!!! I've been infected by Intercal!

      --
      - - You can't take something off the Internet! That's like trying to take pee out of a swimming pool.
    9. Re:Hmm by Anonymous Coward · · Score: 0

      I realize after reading my original comments that I should have choosen some better wording!


      Don't feel bad, everyone here posts comments which denounce the work and intelligence of people who actually do stuff . While it hardly ever happens, occasionally the people who actually do the work put the people who denounce it (politely) in their place.

  8. Best line from the interview: by mike_the_kid · · Score: 4, Funny

    JA: What tips and inspiration can you offer aspiring kernel hackers?

    Robert Love: Read the source, play with the source, and bathe regularly.

    All computer science labs should have available eye-wash style emergency showers.

    --
    Troll Like a Champion Today
    1. Re:Best line from the interview: by Anonymous Coward · · Score: 0

      Actually, I'd love to be able to hack on the kernel while in the bath/shower/pool or lolling in the gentle surf of a tropical beach. There are few places I'm more comfortable than in the water

      Although, apparently, no matter what the temperature, after a while (max. tolerance is about 24-48 hrs immersion at body temperature) the human temperature regulation system is shot to hell and you go hypothermic/cold-blooded i.e. unable to regulate your own body temperature. Doesn't matter so long as the temperature is set to just below body temp. I guess, but dangerous none the less. Osmotic pressure could f*ck you up too...

    2. Re:Best line from the interview: by Anonymous Coward · · Score: 0

      especially for dealing with linux source, damn that stuff gets ugly in places.

    3. Re:Best line from the interview: by Anonymous Coward · · Score: 0

      boo-yah

    4. Re:Best line from the interview: by hysterion · · Score: 1
      JA: What tips and inspiration can you offer aspiring kernel hackers?
      Aspiring? Aspirin.
      Aspirin inspires aspirants.
    5. Re:Best line from the interview: by philipm · · Score: 0

      have you ever been outside?

    6. Re:Best line from the interview: by Anonymous Coward · · Score: 0

      huh? - It may be that you've misunderstood: It's not just the temperature of the water that makes you hypothermic, it's the fact it conducts heat muych better than the air our thermal regulatory system is "designed" to cope with - so it eventually gives up.

  9. Ok, I'm missing something by Quasar1999 · · Score: 2

    Can someone fill me in... Hasn't Microsoft been claiming windows has been preemptive since win95??? Is this some other form of 'preemptiveness'?

    What is this 'preemptive' thing refering to? Task scheduling?

    --

    ---
    Programming is like sex... Make one mistake and support it the rest of your life.
    1. Re:Ok, I'm missing something by Anonymous Coward · · Score: 0

      When a thread is running in user space it is preemptable.
      Once it enters the kernel, it executes without interuption until it returns to usermode.

    2. Re:Ok, I'm missing something by Quasar1999 · · Score: 1

      I see, but was Microsoft's OS preemptible when executing inside its kernel?

      I'm trying to determine if Windows has/had a better kernel design than linux.

      --

      ---
      Programming is like sex... Make one mistake and support it the rest of your life.
    3. Re:Ok, I'm missing something by jeffy124 · · Score: 4, Informative

      pre-emptive is a form of multi-threading. the other form is co-operative.

      Co-operative means that threads relinquish control on their own. This meant that a greedy thread could put a serious stranglehold on the OS and lock-up the system, forcing a reboot.

      Co-operative was used in every Mac prior to and including OS-9, which made it very unstable should a thread crash.

      Pre-empt means the OS decides when the thread loses control. A thread can still voluntarily relinquish control, but the final call still comes down to the OS.

      OS-X is fully pre-empt, meaning a crashed thread doesnt crash the entire system, bettering the stability overall as that will usually only crash the program that thread belonged to, not the entire system.

      I dont know what MS has for their threading model, they seem to have a very bad hybrid system. The threading in Windows 95/98 tends to cause a good number of BSODs. NT/2000 OTOH, had a better model and crash a lot less often, which is why they have traditionally been the more stable MS OS.

      Task scheduling has to do with what thread gets control next. Priority and other factors decide that. Solaris threads have 2^31 possible levels of priority, Windows (all versions, IIRC) has 5 classes and then 5 sub-classes of priority for each (a REALLY screwed up and tough to understand and explain technique, iow not a clear-cut 25 levels), and Java has 10 levels for cross-platform threading. Each model has their plusses and minuses, but that's getting offtopic from preemptive vs. co-operative.

      --
      The One Rule Of Chess You'll Ever Need: Don't play someone who carries a kit in their bookbag.
    4. Re:Ok, I'm missing something by Anonymous Coward · · Score: 0

      NT is. 9x isn't.

    5. Re:Ok, I'm missing something by sagei · · Score: 4, Informative

      Can someone fill me in... Hasn't Microsoft been claiming windows has been preemptive since win95??? Is this some other form of 'preemptiveness'?

      You are thinking of forms of multitasking. One form is preemptive, in which tasks are given a specific period in which to run (timeslice) and then forcibly preempted by the next runnable task when that quanta ends. Win95, NT, all Unices, and anything decent fit in here

      The other form is cooperative, in which tasks run until they yield execution. This is how Win 3.1 is. In 3.1, tasks ran until they finished processing their current Windows Message or called yield().

      This article is about a preemptive kernel, where actually the same ideas apply. Inside the kernel, things are currently cooperative in the sense the kernel code runs until it completes or yields control. This patch makes it preemptive -- it will be preempted when something more important needs to happen.

      Win95 does not have a preemptive kernel (it isn't even reentrant). NT might. Solaris does. Linux does with this patch.

      --

      Robert Love

    6. Re:Ok, I'm missing something by joe+user+jr · · Score: 3, Informative

      windows has been preemptive since win95??? Is this some other form of 'preemptiveness'?

      Windows' "preemptiveness" refers, as explained somewhere else here, to the windows kernel being able to jump in and stop any user process executing to give the next one its term - so (in theory) no user-run program can hog all of the CPU and resources.


      Linux has always done this - it's the standard way to write a unix kernel.


      In relation to the audio discussion, preemptive in a linux kernel means (as far as I understand it) that the kernel attempts to guarantee a minimum time between an interrupt coming in on some device and control being handed to the driver for that device. It does this by preempting its own tasks in order to hand control over to the driver for the device needing the attention (the driver, of course, runs as a kernel process, also).


      Typically, the goal is to get a maximum latency of 10ms or better (less) between the interrupt and the waking up of the driver.


      In a professional audio situation, of course, the user can go a long way by stripping all the unnecessary hardware and tasks out of the configuration of the machine, which will mean that (if done properly) the only thing which can get in the way is linux' internal book-keeping. This is a different situation to playing with audio apps on a networked computer while you print out web pages.. ;)


      Beyond this, there is real-time linux in which (as I recall) a hard maximum latency of 2ms or so is claimed. But the overheads introduced by all the timing and checking which guarantees this impact the performance to the extent that it's quite a different beast, for specialised applications.


      Some audio programmers would like a low-latency patch (either the preemptive one or some other) which has a soft guarantee of "almost all" latencies below 5-10 ms to go into the standard kernel because they would like their userbase not to have to deal with the complexities of kernel recompilation and/or patching, but this is a pretty tall order because Linux will not like having basically ugly fiddly designs with lots of volatile little conditionals which have to be fiddled with everytime something changes going into the beautiful kernel.


      Maybe vendors like mandrake should pick up the baton and provide a low-latency alternative kernel installable with their gui tools or at install time, which would keep everyone happy at the cost of not too much effort and space.

      --
      .sigs: Just Say No!
    7. Re:Ok, I'm missing something by Yokaze · · Score: 3, Informative

      Not quite correct.
      It's not preemptive vs. cooperative.

      But preemptible vs. non-preemptible kernel.

      "Pre-empt means the OS decides when the thread loses control."
      Yes, that's preemption.

      B,ut there is another preemption.
      Should a process get a higher priority than the currently running process, then the current process gets preempted.

      E.g.
      You have a low priority CPU-bound process A(e.g. Seti@home) and you have a high priority I/O-bound process B (e.g. XMMS).
      Usually, B does nothing but waiting for I/O (e.g. the soundcard and the harddisk). While waiting, the process is not in the run-queue.
      Meanwhile, A hogs the CPU. Usually, when the I/O request is done, the CPU gets an interrupt request (IRQ) which causes the OS to switch in kernel mode and handle the request. B gets active again and has a higher priority than A, so A gets preempted. Usually that works fine, but now A wants to do some I/O (deliver a packet) and calls the kernel, which handles the request. Just this moment is the I/O for B ready. In Linux (as in most other OSs too) B has to wait until A gets its syscall done, since the kernel is not preemptible. This period of time until the B gets the CPU increases the latency.

      Windows 95 is preemptive (at least according to A. Silberschatz) as is Linux.

      The high amount of crashes of the whole system stem from the resource protection (direct hardware access), not the scheduling.

      --
      "Between strong and weak, between rich and poor [...], it is freedom which oppresses and the law which sets free"
    8. Re:Ok, I'm missing something by Anonymous Coward · · Score: 2, Informative

      As I understand it:
      NT has 32 priority levels.

      The split into idle (p=0), low, below-normal, normal, above-normal, high and realtime (p>=16) (which I assume is what you were referring to) is just a simple way to name different general priority levels. It's the 32 levels that matter.

      Normal priority is 14.

      Anything running at 16 or above ('realtime') will never get interupted by threads running at lower priorities. The OS will never change these priorities, though the user can.

      Ready to run threads of priority =14 can be given a temporary priority boost to 15 (lasts for a double timeslice which is 40ms normally) if they have been ready to run for about three seconds. Anything at lower than priority 16 shares what time is available, with higher priorities being favored. At priorities lower than 16, no thread will ever be totally starved of CPU time.

      Priority 0 is for things which should only run when nothing else needs CPU time, like RC5 or SETI@home (though some such apps actually set themselves to priority 4 and hence slow most things down. folding@home used to do this).

    9. Re:Ok, I'm missing something by Anonymous Coward · · Score: 0

      Make sure you look at Win2K and WinXP. They are the modern kernels. The win9x camp is not a 'production' quality kernel (as we all know), but W2K and WinXP are very highly engineered, and I would say about 3-4 years ahead of Linux.

    10. Re:Ok, I'm missing something by nathanh · · Score: 2
      Can someone fill me in... Hasn't Microsoft been claiming windows has been preemptive since win95??? Is this some other form of 'preemptiveness'?

      What you're thinking of here is userspace preemptiveness. A userspace application can be preempted to make way for another process. The other process could be in userspace OR kernelspace. Linux has always been like this.

      The article is describing kernelspace preemptiveness. Basically if the kernel is doing something (eg, reading a block off disk) then the current Linux kernel can't preempt that to do something else in userspace OR kernelspace.

      These patches add kernelspace preemptiveness in addition to the already existing userspace preemptiveness. It makes Linux extremely suitable for low-latency applications (eg, professional audio).

    11. Re:Ok, I'm missing something by be-fan · · Score: 2

      Also, whenever a thread unblocks on I/O, it gets a priority boost so it can run again, quickly issue another I/O, and go back to sleep. The boost varies depending on the thing that it unblocked from, such as audio or input. Input tends to get large boosts, which is one reason why Windows tends to be "Snappier" than Linux.

      --
      A deep unwavering belief is a sure sign you're missing something...
    12. Re:Ok, I'm missing something by Anonymous Coward · · Score: 0

      I dont know what MS has for their threading model

      As I recall from back when 95 was released: 16-bit tasks are all run in a shared cooperatively multitasked environment, as was the case in 3.1 and earlier, 32-bit tasks are all preemptive.

      NT probably ran each 16-bit task in its own environment, other than this I don't know the differences.

    13. Re:Ok, I'm missing something by lkaos · · Score: 1

      Agreed on all but the last line. Large number of crashes are due to lack of basic memory protection. A process can crash and cause corruption in globally shared kernel memory. This is quite bad in that it will bring down the whole OS when only the process should have died. While working on a debugger, I was even able to put the win kernel in debug mode and set breakpoints in the kernel! Talk about scary, needless to say, the first lesson learned when writing a win debugger is to put a breakpoint before all system calls!!!

      Direct hardware access is a problem, but not nearly common enough to cause the amount of crashes that occur in windows. And for all the zealots out there, yes, many factors contribute to windows instability, but I truely thing that most are caused by the page protection (another reason why NT based kernels don't crash nearly as much).

      --
      int func(int a);
      func((b += 3, b));
    14. Re:Ok, I'm missing something by Yokaze · · Score: 1

      I consider memory as a another resource and wanted to abstract it a little more.
      Generally, an unprotected concurrent access can lead the system to an unstable state.

      Of course, concurrent direct access on the printer port will hardly crash the OS, whereas a write to a random memory address has good chances to do so.

      --
      "Between strong and weak, between rich and poor [...], it is freedom which oppresses and the law which sets free"
    15. Re:Ok, I'm missing something by Anonymous Coward · · Score: 0

      Of course it is better, that is why it crashes so much. That is how you tell how good a kernel is, by the amount of time you have to spend every year loading that os into the machine after a huge ugly nasty crash wipes out the hard disk.

      Why, manys the year that I've only had to boot my linux machines 2-3 times, because of power failures or hardware upgrades, while my windows machine a lot of time will crash when I'm first booting it. That means that it is soooooo much better.

      Oh yeah, and W2K is so good that it has to be huge. Bigger is better, you'll never load W2K on an old 386, with 8 MB of RAM and a 40 MB hard drive to use it as a firewall/router? Because you need better hardware for W2K, that means that it is better.

    16. Re:Ok, I'm missing something by Johnno74 · · Score: 1

      The main reason Win9x is so crap at multi-tasking is most of the kernel isn't re-entrant, even though it is pre-emptable, 'cause of all the ugly 16-bit code in there.

      Thats why if one process in win9x locks up, quite often everything else gradually locks up too, as other processes can't get to the kernel until the original process unblocks.

      Win9x "multi-tasking" is such an ugly kludge it shouldn't really be called that at all.

      The overall poor stability of Win9x is more to do with unprotected memory than multi-tasking cockups tho.

    17. Re:Ok, I'm missing something by Johnno74 · · Score: 1

      Win95 does not have a preemptive kernel (it isn't even reentrant). NT might. Solaris does. Linux does with this patch.

      Yes, NT's Kernel is preemptive, with pretty fine locks - this is why it scales quite well on MP machines.

    18. Re:Ok, I'm missing something by Anonymous Coward · · Score: 0

      Right. The difference in design philosophy between Windows NT, and Windows 9x, is that Win9x has a 32-bit API grafted onto largely a 16-bit non-pre-emtively-multitasked codebase (legacy Win 3.x code for compatibility), while NT has a 16-bit API running inside seperate sandboxes on top of a robust (proper protected memory and resource allocation) 32-bit OS.

      What you are talking about, is the Win16Mutex, which even the "pre-emptively multitasked" 32-bit code/APIs have to acquire to call down into the 16-bit legacy (written in ASM) code, which cannot be preempted. In a way, that 16-bit legacy code is really the true, non-preemptive "kernel" of Win9x, with the 32-bit APIs just grafted on top of it.

      Think of it as a version of Win3.x, with the Win32s layer on top of it, with a newer, prettier more-like-MacOS-or-OS2 GUI.

      (Well, except that Win9x also has the (truely pre-emptively multitasked) VMM kernel sitting under that, and on top of the ring0 virtual device drivers which sit on top of the hardware.)

      It's a wonder anything works at all on top of this 32-bit API on top of a 16-bit API on top of a 32-bit OS on top of a 16-bit OS. Figure that one out.

    19. Re:Ok, I'm missing something by spitzak · · Score: 2

      You are confusing preemptive with multithreading.

    20. Re:Ok, I'm missing something by jovlinger · · Score: 1

      Those numbers explain why nt/2000 is such a dog when compiling in the background.

      Three seconds is just a long time for any task to be in the run queue. Seems MUCH too long. The NTtimeslice would be 20ms according to you, so three seconds is what -- 150 slices?Sounds like something is rotten in the state of art.

  10. Re:So will that make Linux a superior audio platfo by Starship+Trooper · · Score: 1, Troll
    No, unfortunately. Professional audio processing requires an extremely special form of real-time processing that is pretty much only good for handling audio, and which actually can cause problems with any other types of software. Therefore, it is unlikely that preemption patches for Linux, which must remain a general-purpose system, will be made. Even most Windows professional audio programs don't use Windows' built-in scheduling; they instead take advantage of Windows' rather loose kernel hooks to preempt the operating system and handle real-time scheduling for themselves.

    Look at BeOS for an example of why this sort of processing can't possibly fit into a normal-use system. BeOS was constructed especially for the handling of low-latency media such as audio, but as anyone who tried to program it can tell you, it was exceptionally difficult to program anything other than media apps with it! The extremely high-resolution threading of the operating system made even the simplest programming tasks near impossible, as mutex locks and thread conditionals needed to be spread throughout the code to ensure proper execution. This is why BeOS ultimately flopped: it was too hard to program for.

    But, of course, this is an area where Linux could shine. Due to its open-source nature, a special media-processing fork of the kernel could be made for those who need to deal with real-time audio, while the general-purpose kernel remains general-purpose. In fact, DeMuDi Linux is already striving for this goal.

    --
    Loneliness is a power that we possess to give or take away forever
  11. I'm not sure... by TheMMaster · · Score: 2, Interesting

    I think this is a good short-term solution for the latency problems but I personally wouldn't include it in the main kernel releases. I believe that it *might* be a good idea to fork the kernel releases (temorarily) in two groups: One for servers and one for workstations until the problems have been solved.
    I think that (for now) using this patch on workstations is a pretty good idea. And I think that there should be a better solution for the problem witch should THEN be something along the lines of kernel 3.0
    I am not a kernel developer or anything, but I am currently reading up on the source and the mailing lists.
    Basically all I am trying to say is: Make it work NOW and solve the real problem later. Just make sure that is WILL be solved... (no microsoft coding ways here ;-)). We still need a larger user base...

    --
    Fighting for peace is like fucking for virginity
    1. Re:I'm not sure... by STSeer · · Score: 3, Informative

      Love said that this patch even if added to the main tree would still be a config option.

    2. Re:I'm not sure... by debrain · · Score: 3, Interesting

      Actually, given the current state of the vm parameters set almost exclusively for a workstation (since bdflush chokes a server real good), would seem to dictate that you have to tinker with the kernel anyway and that forking the kernel itself wouldn't necessarily help since the number of forks for each configuration of properly scalable high intensity server would be enormous. It works good for a workstation, and perhaps preemption should be default on a workstation (I use Love's patch on mine), but splitting the kernel between workstations and servers is probably not the best way to go about making servers customized to their personal best performance level since the configuration is quite sticky anyway.

    3. Re:I'm not sure... by sagei · · Score: 5, Informative

      Disclaimer: It's my patch

      I think this is a good short-term solution for the latency problems but I personally wouldn't include it in the main kernel releases. I believe that it *might* be a good idea to fork the kernel releases (temorarily) in two groups: One for servers and one for workstations until the problems have been solved.

      I tend to look at this more of a long-term solution, and I think people who see it has a short-term solution or hack are missing the point. First, this is a feature. We aren't kludging kernel code so that we can lower latency by stopping it when needed. We are effectively using the SMP code to multitask better within the kernel.

      Second, forking the kernel over this is a terrible idea. Since it is a config setting, this is a non-issue anyhow, but I really don't want to see this thing forked off. In fact, I think the ideal situation is where we can get a preemptible kernel that benefits throughput so that server processes benefit from it as well.

      I think that (for now) using this patch on workstations is a pretty good idea

      Agreed :)

      And I think there should be a better solution for the problem witch should THEN be something along the lines of kernel 3.0

      There isn't a better solution that is not a hack. There is a reason Solaris, NT, and all RTOS are preemptible inside the kernel: it is the only way to achieve real-time response. You just _have_ to be able to respond to events when needed.

      The "better" solutions in this case are "simpler" -- if we can hack some conditional schedules into places, perhaps simplify some algorithms, etc. then we can perhaps reduce latency without preemption. This is what Andrew Morton's low-latency patches do. But we need more. The point is not that preempt-kernel is a hack, but that it is a whole new high-tech feature, and some people want to find a simpler solution.

      Personally, I don't think a simpler solution exists, and I believe the preemptive kernel satisfies other problems (and it also a neat feature:>). Thus I work on it.

      --

      Robert Love

    4. Re:I'm not sure... by The+Pim · · Score: 2
      There is a reason Solaris, NT, and all RTOS are preemptible inside the kernel: it is the only way to achieve real-time response.

      I thought that what (certain) kernel hackers really objected to is preemption while locks are held. The complications (eg priority inversion) they talked about seem only to arise in that case.

      So, first, does "fully-preemtive" traditionally mean with or without locks? Are Solaris, NT, and RTOS preemtible when locks are held?

      Second, observed results aside, what reason do you have to believe that preempting the lock-less parts of the kernel is "good enough". All else equal, one would expect the latency distribution to be similar with and without locks, so you would expect plenty of "worst cases" to occur with locks. Of course, there is already a pressure to reduce the time that critical locks are held, but I wouldn't be surprised to see non-contended locks (especially outside the kernel core) held for long times. So is there a good reason that the important "worst cases" are happen without locks?

      IANAKH.

      --

      The evaluation of an action as 'practical' . . . depends on what it is that one wishes to practice.
    5. Re:I'm not sure... by sagei · · Score: 5, Informative

      I thought that what (certain) kernel hackers really objected to is preemption while locks are held. The complications (eg priority inversion) they talked about seem only to arise in that case.

      There are a few reasons other hackers complain, although I didn't know this was one of them. Since MontaVista's original preemptive kernel work, I believe, we have never preempted inside of locks. Note that you can, but then you reach the issues with deadlocks and thus the need for priority-inversion that you spoke of.

      So, first, does "fully-preemtive" traditionally mean with or without locks? Are Solaris, NT, and RTOS preemtible when locks are held?

      I would say it means sans locks. None of the mentioned OS's are preemptive while holding a lock. You always have to respect the lock. Now, you can preempt during the lock and go do other things. If you do this, you are assuming the lock is going to be held long (or else it is favorable to just spin for a cycle or two). In this situation you want to use semaphores, which we _do_ preempt during.

      When a process hits a semaphore that is in use, it goes to sleep and something else continues. The process awakes when the resource is available. Now we reach the problem you wrote of above: priority inversion. What if task A holds resource Y and sleeps waiting for resource X and task B holds resource X and sleeps waiting for resource Y? You deadlock.

      Thus we need to use a type of semaphore called a priority-inheriting mutex, which inverts the priority of the task holding a resource so it will always complete and release the lock. I know Solaris has these. However, I would consider any kernel that can preempt itself in general a preemptible kernel.

      Second, observed results aside, what reason do you have to believe that preempting the lock-less parts of the kernel is "good enough". All else equal, one would expect the latency distribution to be similar with and without locks, so you would expect plenty of "worst cases" to occur with locks. Of course, there is already a pressure to reduce the time that critical locks are held, but I wouldn't be surprised to see non-contended locks (especially outside the kernel core) held for long times. So is there a good reason that the important "worst cases" are happen without locks?

      First, before I cast results aside, let me mention that observations show we are already lowering latency a great amount. But, you are right, periods in which locks are held are a problem. This is why I mentioned in the interview the use of things like Andrew Morton's low-latency patch, the preempt-stats patch (for finding the locks), etc.

      Some of the problems still occur while locks are held, but thankfully the point of a spinlock is that they are held for a VERY short time. A solution to this may be to replace the spinlocks held for a long time with a priority-inhereting mutex.

      --

      Robert Love

    6. Re:I'm not sure... by be-fan · · Score: 3, Informative

      So, first, does "fully-preemtive" traditionally mean with or without locks? Are Solaris, NT, and RTOS preemtible when locks are held?
      >>>>>
      I don't know about those, but BeOS isn't preemptible during a spinlock either. BeOS requires you to disable local interrupts before acquiring a spinlock, which means that the scheduler never even gets to run on that CPU because it won't take the timer interrupt. I'd surmise that almost all preemptible kernels work like this. Judging from this doc it would appear QNX does it this way as well. This method shouldn't effect latency, because you are only supposed to hold a spinlock for a very short time.

      --
      A deep unwavering belief is a sure sign you're missing something...
    7. Re:I'm not sure... by Anonymous Coward · · Score: 0

      Actually, Solaris is preemptible when holding locks. There is no "kernel lock" in solaris, instead every data structure in the kernel has it's own lock. That means that you can even have multiple threads (running on multiple CPU's) modifying the process structure at the same time, as long as they don't access the same process.

      Having a very high granularity of locking inside the kernel is required in order to be able to scale SMP to many CPU's. Remember that Solaris scales well into hundred of CPU's. When doing this is's vital that many CPU's can run the same ethernet driver at the saem time, for exmample.

      Someone mentioned priority inversion problems. Yes, those were very big problems in Solaris, which is the main reason why Solaris 2.0 (the first version with fully pre-emptable kernel) up until around 2.4 were severely buggy. Most of the kernel hangs and panics were caused by deadlocks or race conditions within the kernel.

      In the long run, Linux needs this kind of of lock granularity as well. Having a single kernel lock is not a viable solution when having lots of CPU's. The work to implement this, however, will be enormous but the payoff will be equally great.

      This patch everybody is talking about is a good first step though.

  12. needed badly by xah · · Score: 4, Insightful
    A fully preemptible kernel is important to the future of Linux. Everyone knows that the system will lock up a lot if it's misconfigured, or if a piece of hardware is buggy.

    So long as the console driver and the keyboard driver are alive, root should always be able to open a new shell and kill an offending process that is hanging the rest of the system. Right now, this is too frequently a non-option.

    --
    I am not a lawyer. Do not take my words as legal advice. If you need legal advice, consult an attorney.
    1. Re:needed badly by Anonymous Coward · · Score: 1, Insightful

      Confusion again about the terms.. The only way bad software takes down the system right now is if it runs the machine out of an available resource (such as ram)

      Pre emptive kernel will NOT help this case.

    2. Re:needed badly by Anonymous Coward · · Score: 1, Informative

      Wrong, dewd. You're thinking of a microkernel. They're two totally different architectures.

    3. Re:needed badly by xah · · Score: 1

      I'm pretty sure that a buggy driver can take down the system. Wouldn't a pre-emptive kernel stop that?

      --
      I am not a lawyer. Do not take my words as legal advice. If you need legal advice, consult an attorney.
    4. Re:needed badly by Anonymous Coward · · Score: 0

      Won't help at all .. buggy drivers will still take down the system.

      On the upside since pre-emption acts a lot like SMP. SMP users should find the drivers they want better debugged.

    5. Re:needed badly by Anonymous Coward · · Score: 0

      Buggy drivers will always be able to take down the system. Drivers on a PC architecture always have to have enough access to critical system operations to be able to bring the system down. NT, for example, is a microkernel design (which is supposed to help driver isolation) but is particularly subsceptible to bad drivers.

    6. Re:needed badly by xah · · Score: 1

      I concede your point. But why does my Linux system sometimes hang when my (probably misconfigured) Netscape browser crashes?

      --
      I am not a lawyer. Do not take my words as legal advice. If you need legal advice, consult an attorney.
    7. Re:needed badly by be-fan · · Score: 2

      Actually, there's some truth to his point. Say a process makes a system call and the kernel code for that call hangs in a loop. Since the scheduler won't preempt the kernel code, that process will run forever and the machine will hang. If the kernel can be preempted, the user can get to a shell and kill the stuck process. I have no idea how often this situation would happen in the real world, though. I'd think that infinite loops would be too much of a newbie bug.

      --
      A deep unwavering belief is a sure sign you're missing something...
    8. Re:needed badly by chabotc · · Score: 5, Insightful

      Actualy 9 out of 10 cases when that happens, and the hardware is locked up, it will have locked up the PCI bridge as well (they have to to communicatie), so this wont do anything.

      Also if the systeem feels locked up, and its not a hardware lock, there's a good chance its the tty/console subsystem thats killed.

      only in a few cases, where a run-away process would deal out so much of a beating to the system, then the better multithreading will help in the way you described.

      (ps, telnetting in is always a good work around for a system with a dead keyboard/console :P)

    9. Re:needed badly by Dwonis · · Score: 1

      I've never had a non-hard-lock situation that the Magic SysRQ keys couldn't handle.

    10. Re:needed badly by MassacrE · · Score: 1

      this sounds more like X windows freezing when netscape crashes.

    11. Re:needed badly by Dwonis · · Score: 2

      Check your RAM. If it's not a RAM bug, it's probably an X server bug.

    12. Re:needed badly by Elladan · · Score: 2, Interesting

      There's a bug in recent 2.4 kernels where a multithreaded app dumping core could livelock the system. You might try setting a hard limit on core file size to zero and see if the crashes go away.

      You'd want to do this in /etc/profile, of course.

    13. Re:needed badly by Peter+La+Casse · · Score: 2, Interesting
      Actually, there's some truth to his point. Say a process makes a system call and the kernel code for that call hangs in a loop. Since the scheduler won't preempt the kernel code, that process will run forever and the machine will hang. If the kernel can be preempted, the user can get to a shell and kill the stuck process. I have no idea how often this situation would happen in the real world, though.

      Will the linux kernel allow a user process to be killed that is blocked in a kernel call? In my experience, Solaris and Tru64 do not: a user program that is blocked in a kernel call will stay blocked until the kernel call returns, regardless of any action (short of rebooting the machine) that a user can take. I assume that there is some well-thought-out reasoning behind this, but sometimes (e.g. during device driver development) I wish it were somehow a configurable behavior.

      I'd think that infinite loops would be too much of a newbie bug.

      Lots of times, the most junior person gets stuck writing device drivers. And even experienced programmers can have brain farts.

    14. Re:needed badly by Pseudonym · · Score: 2

      Xah is correct except for one detail. As far as the scheduler is concerned, pre-emptable threads running inside the kernel should be pretty much the same as pre-emptable user-space threads in a microkernel system. They should be able to be killed and/or restarted if they've hung.

      The one mistake I think xah made was using the term "process". Linux's current design encourages the confusion between threads and processes by implementing threads as processes that happen to share "process stuff" (address space, file handles, credentials, rlimits etc).

      --
      sub f{($f)=@_;print"$f(q{$f});";}f(q{sub f{($f)=@_;print"$f(q{$f});";}f});
    15. Re:needed badly by Johnno74 · · Score: 1

      On NT you can't kill a process when it is in the kernel/device driver either... I get that a lot when I put a bad CD in my drive and try and read it. The app hangs, and I try and kill it only to be told "this task cannot be ended at this time".

      Grrr.

    16. Re:needed badly by Anonymous Coward · · Score: 0

      Windows 2000 has the same issue. If a user program calls into the kernel, and gets blocked somewhere, either you can't kill the process at all, or in the process of killing the process (no pun intended), you get a blue screen (PROCESS_HAS_LOCKED_PAGES is the one I usually get).

    17. Re:needed badly by jeti+ · · Score: 1
      Will the linux kernel allow a user process to be killed that is blocked in a kernel call? In my experience, Solaris and Tru64 do not: a user program that is blocked in a kernel call will stay blocked until the kernel call returns, regardless of any action (short of rebooting the machine) that a user can take. I assume that there is some well-thought-out reasoning behind this, but sometimes (e.g. during device driver development) I wish it were somehow a configurable behavior.

      In most cases, Linux will block like every(?) other *nix kernel. The reason for this is that inside kernel the process may have reserved some locks or resources, and the process itself is the only one which knows how to release them. Also, the process may be in the middle of programming some low level device, and stopping it might leave the device in undefined state. So in the general case, it is impossible to stop a process during system call.

      Some system calls which can take longer (for example connecting to a remote TCP/IP socket) are designed so that they can be interrupted at certain points.

      --

      // /

  13. Re:gay by Anonymous Coward · · Score: 0

    why do a lot of extraordinarily stupid individuals feel the need to broadcast their stupidity to the rest of the world?

    Don't be so hard on yourself.

  14. What does that mean? by BlackGriffen · · Score: 2, Interesting

    I thought giving the Kernel the ability to preemt other programs was important. If you give programs the ability to preempt the kernel, doesn't that just change the system back to cooperative multi-tasking? I could just see programmers abusing the ability to preempt the kernel to squeeze a little more speed out of their app.

    1. Re:What does that mean? by Anonymous Coward · · Score: 0

      You're giving the scheduler the ability to preempt threads executing in the kernel.

      You're not giving applications to ability to preempt other threads at will, or to make themselves unpreemptable.

      This isn't abusable (excluding exploitable bugs).

    2. Re:What does that mean? by naasking · · Score: 2, Informative

      No, I think you're misunderstanding. It's not preempting the kernel, it's preemtping a lower-priority thread that happens to be in the kernel (ie. during a system call). If there is a runnable thread with a higher priority, it should be set running. But as things currently stand, if the low-priority thread is in the kernel it can't be preempted, and so the high priority thread has to wait. That is bad.

    3. Re:What does that mean? by Adnans · · Score: 2

      I thought giving the Kernel the ability to preemt other programs was important. If you give programs the ability to preempt the kernel, doesn't that just change the system back to cooperative multi-tasking?

      Nope, because the kernel is still always in control. In a cooperative multi-tasking enviroment the userspace programs can choose to hold on to the processor as long as they like (i.e. not cooperate nicely with others). This patch simply allows a lower priority process to be interrupted by a higher priority one even if the low priority one is in the kernel, doing a system call for example. However, this preemption is done by the kernel scheduler.

      -adnans

      --
      "In short: just say NO TO DRUGS, and maybe you won't end up like the Hurd people." --Linus Torvalds
  15. Background and a different patch by alewando · · Score: 5, Informative

    If you're wondering what the heck a preemptive kernel entails, then here's some background.

    Also, if you don't like Robert Love's implementation, then Andrew Morton maintains a patch with a similar low-latency goal.

  16. Re:gay by Anonymous Coward · · Score: 0

    why do a lot of extraordinarily stupid individuals feel the need to broadcast their stupidity to the rest of the world?

    So idiots like you will reply. Jackass. Go eat poop.

  17. What does it mean to me? by CTho9305 · · Score: 0
    As a gamer/user, in what way does this benefit me? I don't really understand what the "latencies" are, and where it would improve my framerate ;-)


    if anyone would care to explain / provide links that would be great

    1. Re:What does it mean to me? by gmack · · Score: 1

      The lower the latencies the smoother your game is likely to be since it's being run at more predictable intervals

    2. Re:What does it mean to me? by Anonymous Coward · · Score: 0

      You can increase your options/framerate by running Windows (just games). If you are a religious Linux user you can benefit from better response. Not sure which ones as ignorant as i am but probably in Input area (Mouse[USB]/Joystick/Keyboard) and some better video response (not more frames, but probably smoother video). Not really sure :) Anyone knowledgeable can explain better? The audio latencies example is too narrow for a better understanding. Thanks

  18. Re:gay by Anonymous Coward · · Score: 0

    Go eat poop

    Eating poop is a very bad idea, as it is highly toxic and can cause severe sickness, or even death.

  19. Links on Spinlocks, etc by Alien54 · · Score: 5, Informative
    There are these links:All around useful stuff, enough to get you started destro^H^H^H^H^H^H hacking your own kernel
    --
    "It is a greater offense to steal men's labor, than their clothes"
  20. OS-X by jeffy124 · · Score: 1

    Mac OS-X is fully pre-empt already, making it a greatly stable system.

    I can only see a fully pre-empted Linux increasing it's already solid stability.

    Now if only we could remove co-operative threading from windows....

    --
    The One Rule Of Chess You'll Ever Need: Don't play someone who carries a kit in their bookbag.
    1. Re:OS-X by JanneM · · Score: 2, Informative

      Linux is fully preemptible, and has always been. This is about being preemptible while executing in the kernel. I have no idea if OSX allows this or not - it's BSD based, so probably no, but then Mach is involved someway or other, so maybe. It would be interesting to know.

      /Janne

      --
      Trust the Computer. The Computer is your friend.
    2. Re:OS-X by Anonymous Coward · · Score: 0

      This is preemptive KERNEL not task multitasking..

      Bad processes do not often take out linux. (unless the admin forgot to set resource limmits

    3. Re:OS-X by jeffy124 · · Score: 1

      the marketing blitz about OS-X has indicated "fully preemptive multitasking" See http://www.apple.com/macosx/

      --
      The One Rule Of Chess You'll Ever Need: Don't play someone who carries a kit in their bookbag.
    4. Re:OS-X by JanneM · · Score: 1

      Yes, yes, but does Darwin preempt _running in the kernel_? It's not the same thing.

      "Fully preemptive multitasking" is about preempting userland programs - and Linux (and other Unices) has had this since day one.

      /Janne

      --
      Trust the Computer. The Computer is your friend.
    5. Re:OS-X by jeffy124 · · Score: 1

      that i do not know.

      I suspect that the answer would be yes it does because Apple had to seriously overhaul the multitasking for the user layer, and knowing the amount of work they did for OS-X, I wouldnt see them not leaving out preemtiveness from the kernel. They also used the word "fully." If the left it out of the kernel, they couldnt use it.

      But that's just my educated suspicion, i dont know for sure what fact is.

      --
      The One Rule Of Chess You'll Ever Need: Don't play someone who carries a kit in their bookbag.
    6. Re:OS-X by sracer9 · · Score: 1

      They also used the word "fully." If the left it out of the kernel, they couldnt use it.

      Remember, they also touted OSX as "The most advanced operating system in the world." Not that it's not a fine OS, but that's a bit of a stretch. Apple is well noted for it's marketing speak and as such, saying it's fully preemptible does not mean that the the kernel itself is preemptive. It very well may be, I just take what they say/advertise with a grain of salt. I've never been too keen on marketing speak.

      --

      No thanks. I don't smoke anymore.
    7. Re:OS-X by Anonymous Coward · · Score: 1, Funny

      OS-X is simply Mach with a BSD API. Mach is one of the original true Micro Kernel designs. 100k and I think it is closer to 10K. Mach is about passing messages between every aspect of what would be in the linux kernel. Scheduling, drivers, vm, everything operates in user space. Perhaps think of just the linux assembly code being all that is in the kernel. For all intense purpose, it is pre-emptible.

    8. Re:OS-X by jonabbey · · Score: 2

      I can't speak to whether or not OS X is kernel preemptible either, but I assume when Apple talks of "fully preemptible" they are just drawing a contrast with the cooperative multitasking that MacOS has had since day one.

    9. Re:OS-X by hereticmessiah · · Score: 1

      A *pre-emptible*kernel* is something Linux hasn't always been. In fact, without applying either Morten's or Love's patches, it still isn't.

      Hence the reason why XMM (amonst other reasons) skips occasionally and loading Mozilla hangs the machine temporarily.

      --
      I don't like trolls and mod against me if you like, but I'd prefer if you'd reply.
  21. alright! by Anonymous Coward · · Score: 0

    ...and if it works, the linux folks will have finally caught up with circa-last-year FreeBSD SMPng efforts!!

    1. Re:alright! by Anonymous Coward · · Score: 0

      haha that's funny everyone not snowed by bsd "leetness" knows smp on bsd is years behind linux.

    2. Re:alright! by Anonymous Coward · · Score: 0

      you are either an idiot, or simply not aware of the -CURRENT branch.

      read up on your facts, troll.

  22. Re:So will that make Linux a superior audio platfo by Xoro · · Score: 5, Informative

    I don't want to sound like I'm contradicting you, but did you happen to read this link from the article? It's specifically about realtime audio. Key paragraph:

    *EXCITING* NEWS: things getting almost perfect ! Ingo's lowlatency-2.2.10-N6 patch with the shm.c part backed out and a modification of filemap.c (thanks to Roger Larsson) performs _REALLY_ well, using my usual latencytest parameters (4.3ms buffer), I got NO DROP-OUTS anymore, with sporadic maximum peaks of ONLY 2.9ms This is really exciting because it opens the doors to a whole new class of Realtime applications for Linux, simply using userspace processes scheduled SCHED_FIFO. I heard of comparable low-latencies only from BEOS, Windows can't simply guarantee these kind of latencies, not even using DirectX. Using a soft-synth on Win98 on my BOX I must use 15-20ms audio buffers to get _SOMEWHAT_ reliable audio. This is actually about more than 3-4times the buffer I used for testing under Linux ( 4.35ms).

    I don't know much about the field, but the page seems to speak to several of the audio-related concerns mentioned above.

    --
    Kill, Tux, kill!
  23. preemptable linux eh..... by Anonymous Coward · · Score: 0

    looks like www.OnCoreSystems.com has had that for quite a while now....and they have context switch times under 5 microseconds...ofcourse they are using linux as a application on their microkernel...

  24. Re:Hmm...laymans terms by A_Non_Moose · · Score: 2

    The left hand (processor 0) needs to know what the right hand (processor 1) is doing.

    Reverse if necessary.

    Ambidexterous people...just HUSH! :)

    Heh, how about that, computers do have a real life (tm) frame of referrence.
    Moose.

    --
    Have you read the moderator guidelines? Well, have you, PUNK? (and I want a Karma: Gnarly option)
  25. Re:Microsoft Anthrax attacks by Anonymous Coward · · Score: 1, Funny

    Is it a Worm, is it a Virus, does it use Outlook?

  26. ATT@Home blocks port 25 by Anonymous Coward · · Score: 0

    Hrm.. I know this is extremely off-topic, but I figure someone on Slashdot is having the same problems, so I'll ask. Are any of you using ATT@Home to host a mail server? Has your port 25 been blocked? Mine has. I hope something terrible doesn't have to happen to the local ATT@Home office...

    1. Re:ATT@Home blocks port 25 by Anonymous Coward · · Score: 0

      maybe they fear anthrax being sent via email

  27. Re:So will that make Linux a superior audio platfo by NeoOokami · · Score: 1

    I couldn't disagree more. BeOS is far from hard to program for. The API's are relatively simple, in fact BeOS is one of the only O/Ses you can read people calling a joy to code for. How much do you even know about it?

  28. Re:gay by wholesomegrits · · Score: 1

    That's the idea...

    --
    No sig is worth reading.
  29. Re:So will that make Linux a superior audio platfo by Lando · · Score: 3, Informative

    Ummm,
    Sorry, just want to note that mutex and semaphore programming is not all that difficult if you do it much. True windows have a few kinks, but the concept is pretty basic. Basically I would have to disagree that mutex and thread programming makes programming hard. It's just programming once you understand it, it's pretty straight forward.

    As for the windows problem use startthreadx instead of startthread (Yeah probably not the real api functions, but close enough haven't worked on windows for a while.)

    Lando

    --
    /* TODO: Spawn child process, interest child in technology, have child write a new sig */
  30. Re:So will that make Linux a superior audio platfo by bmacy · · Score: 1

    OK... I'm confused... this is extrmeley off-topic and I've never touched BeOS (besides failing to install it) so I don't know what I'm talking about.

    Are you saying that in a multi-threaded program BeOS was so finely preemptible w/ small time slices that you couldn't be sloppy with resource contention like you can get away with on most UP platforms? I can't see any other way a scheduler would effect a user application.

    Or maybe the application framework you used for BeOS applications allowed events to be handled in parallel? Or...?

    Brian Macy

  31. Re:Microsoft Anthrax attacks by Anonymous Coward · · Score: 1, Insightful
    Is it a Worm, is it a Virus, does it use Outlook?

    Its a Virus.

  32. Don't confuse this with cooperative-vs-preemptive by Anonymous Coward · · Score: 1, Informative
    This has nothing to do with cooperative vs. preemptive multitasking. In that sense, Linux (and every other Unix-like OS on the planet) has been preemptive forever.

    This is about making the kernel preemptible, which means that a process can be preempted if it's in kernel space (i.e. making a system call) as well as when it's executing normal user code.

    Without a preemptible kernel, a process can remain on the cpu during the several milliseconds that a system call can potentially take to return or sleep, even if a higher priority process becomes runnable during that time.

  33. Re:LOOK, NO CHARACTERS! (by keesh) by Anonymous Coward · · Score: 0

    conjecture:
    all posts are trolls.

    proof method:
    show that a post with n characters is considered a troll.
    show that a post with n+1 characters is considered a troll.

    proof:
    let n=0
    for a post where n=0 (i.e. with zero characters) click link (*)
    Note the moderation.
    for a post with n+1 characters click link (*)
    Again, observe the moderation.

    Therefore, it is proven by mathematical induction that all posts are considered trolls.

  34. Re:Microsoft Anthrax attacks by Anonymous Coward · · Score: 1, Funny

    After the MS anthrax attack, I saw Linux geeks dancing and celebrating in the streets on CNN. Fucking assholes. We should bomb them.

  35. Re:LOOK, NO CHARACTERS! (by keesh) by Anonymous Coward · · Score: 0

    Proof by induction is not proof. And you just copied that from fortune, anyway.

  36. Windows 2000/NT by Beatlebum · · Score: 0, Troll

    Of course it would be crass to mention that Windows NT/2000 has had a preemptive kernel from day 1. Facts and *nix polictical correctness don't mix too well at /.

    1. Re:Windows 2000/NT by Anonymous Coward · · Score: 0
    2. Re:Windows 2000/NT by RelliK · · Score: 4, Interesting

      Really? That's the first time I hear about that.

      There is a difference between pre-emptive multitasking and pre-emptible kernel.
      Pre-emptive multitasking means that the kernel can interrupt any thread and give control to another thread, so that a thread cannot hog the CPU resources. This is what all modern operating systems do, except Windows 3.1/9x/Me and MacOS (pre- X), though it could be argued that Windows 3.1/9x/Me is not an operating system much less a modern one ;-)

      Pre-emptible kernel is a different beast. It means that the kernel can interrupt itself (i.e. a thread running in the kernel mode) and give control to another thread running in the kernel mode. This is used in real-time operating systems where you need to have a guaranteed maximum response time (i.e. a thread must not wait longer than a certain amount of time before it gets control). However, this is not all that useful for general-purpose OSes and may even be detrimental to servers, where throughput matter more than response time. So it's good to know that this will be a compile-time option.

      --
      ___
      If you think big enough, you'll never have to do it.
    3. Re:Windows 2000/NT by Beatlebum · · Score: 1

      >> Really? That's the first time I hear about that.

      Well consider yourself informed.

      And yes, I do know what the hell I'm talking about. Save the tutorial for someone that will be impressed.

    4. Re:Windows 2000/NT by Anonymous Coward · · Score: 0

      Would be comparable to Linux if it were an option. Please name another OS that gave users the choice of higher overall performance (non-preemptable) or lower latency in certain situations (preemptable).

      Thank you.

    5. Re:Windows 2000/NT by Anonymous Coward · · Score: 0

      you are an ass clown, bite my sack.

    6. Re:Windows 2000/NT by mimbleton · · Score: 1

      Mostly correct but Windows 9x/Me had fully pre-emptive multitasking for all Win32 apps.
      Where it suffered was memory protection which had to be partially sacrificed to fully support Win16 apps.

    7. Re:Windows 2000/NT by Anonymous Coward · · Score: 0

      Well, there is that stupid option in NT to tune the system for Desktop use, Server Use or (cant remember). What do they use is beyond my knowledge, but i wouldn't say there is no option in NT. There is, whether it works or not i am not sure.

    8. Re:Windows 2000/NT by Samrobb · · Score: 1
      However, this is not all that useful for general-purpose OSes and may even be detrimental to servers, where throughput matter more than response time.

      Actually, I would think that this would be overall beneficial to servers. Yah, raw server throughput is important; but so is response time, particularly when a server is heavily loaded. I would think that a pre-emptible kernel would servers to handle more simultaneous users in heavy load cases.... you'd effectively be sacrificing some I/O throughput in light load situations for a guaranteed I/O throughput and responsiveness under heavy loads.

      --
      "Great men are not always wise: neither do the aged understand judgement." Job 32:9
    9. Re:Windows 2000/NT by EnglishTim · · Score: 2

      Win 9x/ME *does* have pre-emptive multitasking. However, it doesn't have very effective memory protection which is why it's rather prone to being crashed by errant programs. I believe this was to ensure compatibility with 16bit apps left over from Win 3.1

    10. Re:Windows 2000/NT by Tony+Hoyle · · Score: 1

      ...but since on Win9x the GDI is a Win16 DLL you don't get any advantage because you keep running out of resources & anything which crashes GDI brings the whole system down.

    11. Re:Windows 2000/NT by TummyX · · Score: 1

      According to Tanenbaum, the Windows 2000 has a fully pre-emptible kernel.

      This is used in real-time operating systems where you need to have a guaranteed maximum response time (i.e. a thread must not wait longer than a certain amount of time before it gets control). However, this is not all that useful for general-purpose OSes and may even be detrimental to servers, where throughput matter more than response time.


      Uh, so why add it to Linux? Cause Linux is also used in embedded systems? Guess what, SO IS NT! You should also tell Sun how crap pre-emptible kernels are so they fix Solaris.

  37. 1991 by Anonymous Coward · · Score: 0

    No, that was old footage.

  38. US declares war on Finland by Anonymous Coward · · Score: 0

    the US has begun nightly bombing runs and commando assaults on the pitiful country of Finland, and preliminary reports suggest that Tove Torvalds has been captured and pack-raped by Green Berets. more news as it cums.

  39. yes, but why? by markhahn · · Score: 3, Informative
    it's all very well to say that you want to trade 5% of normal performance for a 200% improvement in latency. but why does anyone need better latency? afaikt, the latency here is strictly for people who want to do RT audio effects. this has nothing to do with audio playback, which has no latency sensitivity (because of buffering). this also has nothing to do with "feel", since humans are terribly slow, and cannot possibly feel the difference between 5 and 10ms.

    I hope that Linus will look at whether these patches hurt the normal case. "normal" means things like kernel compilation, not just an arbitrary latency measure and dbench (one of the least realistic benchmarks possible!)

    there are good reasons to be skeptical of all-out premptiveness: it will unavoidably lower throughput in easy-to-define cases. any intro OS text will talk about optimal scheduling, where 'optimal' requires a definition of throughput or some other metric. preemptive kernels will context switch more, and will probably interfere with the natural 'batching' that happens when a big job runs for a while. think about caches: you never want to switch unless you must. this is not an argument against low-latency! it's an arguement against lowest latency as an absolute; we need to set a target (5ms would be fine imo) and meet it. going beyond such a goal will hurt the normal case.

    1. Re:yes, but why? by Spy+Hunter · · Score: 4, Insightful
      this has nothing to do with audio playback, which has no latency sensitivity (because of buffering)

      Unless you're writing a game, where sounds have to happen at specific times synchronized with events on-screen. Or you're in KDE and you want a "minimize" sound effect to happen when you press the button, not a second afterward. Or you're writing a media player and you want to have an EQ that responds immediately rather than a second from now, making it a tedious chore to adjust the settings.

      Large latency is very noticable in these situations. While it may sound like pointless whining to complain about the "minimize" sound effect being a second late, it really creates a bad perception in the user's mind about the speed of KDE. These things are actually important.

      --
      main(c,r){for(r=32;r;) printf(++c>31?c=!r--,"\n":c<r?" ":~c&r?" `":" #");}
    2. Re:yes, but why? by Androgynous+Howard · · Score: 1

      There is lots of software that would benefit from lower latency. Human perception is not as slow as you think. Just play some mp3's in XMMS and then change the volume. It is really annoying that there is a lag until the volume really changes.

      The reason for the lag is that there is a quite large buffer for the audio output. And the reason for this buffer is that sometimes the latency of the linux kernel gets really bad, and you do not want interrupted music when doing disk I/O.

      I would love to have a high latency patch available, even if the peak performance would be reduced by, say, 5%. This is a desktop machine, and it is idle most of the time anyway.

      regards,

      Androgynous Howard

    3. Re:yes, but why? by sagei · · Score: 5, Informative

      Disclaimer: It is my patch

      but why does anyone need better latency? afaikt, the latency here is strictly for people who want to do RT audio effects. this has nothing to do with audio playback , which has no latency sensitivity (because of buffering). this also has nothing to do with "feel", since humans are terribly slow, and cannot possibly feel the difference between 5 and 10ms.

      You ever have an mp3 skip? Audio become out of sync in a game? That is caused by scheduling latencies becoming greater than the duration of the audio buffer. Ie, audio playback does not just need x units of CPU but it also needs it every y units of time. The preempt-kernel patch helps alleviate this.

      I hope that Linus will look at whether these patches hurt the normal case. "normal" means things like kernel compilation, not just an arbitrary latency measure and dbench (one of the least realistic benchmarks possible!)

      Not only does preempt not hurt a kernel compile, but it helps it. I and many users have benchmarks. One of my requests from users is to get a lot of benchmarks and "feelings" so I can substantiate the patch. I am _not_ an audio guy. I use my Linux machine to code, go on the net, etc. just like 90% of the people here. Preemption helps me. I don't want to hurt the common case either.

      Even so, it is a configure item. Merging it into the kernel does not equate to you having to use it. But I bet you would want to!

      there are good reasons to be skeptical of all-out premptiveness: it will unavoidably lower throughput in easy-to-define cases. any intro OS text will talk about optimal scheduling, where 'optimal' requires a definition of throughput or some other metric.

      The cases in which we lower throughput are cases in which file I/O is favored since it runs until completition. In this case, you can extend that argument to be that I/O-intense tasks should just be cooperatively scheduled. An I/O task won't be preempted unless its timeslice has run out (ie, it should be preempted, and it would be if it were in userspace). If the I/O is so critical, run it at a higher priority. Hell, maybe we should look into a higher timeslice.

      Note that a lot of this is a non-issue, since we don't affect throughput (or actually improve it!) In the cases throughput is decreased, it is just a couple of percent, which could be cost-benefited to the increase in response some other application gets.

      we need to set a target (5ms would be fine imo) and meet it. going beyond such a goal will hurt the normal case.

      This is very very true, and an insightful point. One of the problems with this whole latency quest is that eventually we are going to reach some point and have to decide if enough-is-enough. We can always keep doing more and eventually the work _is_ going to be detrimental to the common-case. I agree we need to set a threshold and celebrate when we reach it. The super-special situations needing much lower latency can apply super-special solutions.

      --

      Robert Love

    4. Re:yes, but why? by Gordy · · Score: 2, Funny
      Robert,



      Admit it, your just a karma hore. 8)


      -Gordy


      One day, we will find it, the rainbow connection..

    5. Re:yes, but why? by be-fan · · Score: 2

      it really creates a bad perception in the user's mind about the speed of KDE
      >>>>>>>>
      No, I believe it is the ass-slow redraw and glacial startup times that do that.

      PS> I use KDE myself, so don't accuse me of being a GNOME-bigot!

      --
      A deep unwavering belief is a sure sign you're missing something...
    6. Re:yes, but why? by markhahn · · Score: 1
      don't be stupid: no one is talking about a second latency. a decently configured machine will never see more than a couple hundred ms event latency; the question is how much performance it's worth sacrificing to get that down to 1ms.

      humans are slow. you CANNOT perceive 5ms.

    7. Re:yes, but why? by Chirs · · Score: 1

      Sorry, not so. Try making a process scheduled in SCHED_FIFO and running as root that tries to schedule itself every 200ms. Then have it print out every time that it is delayed for more than 400ms. Run it as root, then go and do some scrolling, some disk access (a find / works great), maybe some heavy duty serial console action. You might be suprised at the latency....

  40. Options... by Mike+McTernan · · Score: 2, Informative

    Whether this patch is added or not is surely just a question of whether it is stable enough or not.

    As it says in the interview, the enablement of the patch is an option in the config... For those that want it (i.e. most desktop users I would expect) it's there. For those that don't, it can be disabled.

    It seems that the patch works, as scientifically explored by his benchmarks. If there is a fault in the patch, I'm sure that half of slashdot will email the chap.

    In summary, it works, is probably stable and can be enabled/disabled in config if needed. It already does, and probably can, benefit lots of people.

    Put it in!
    (At worst it can be removed and a new kernel released the day after... hehe)

    --
    -- Mike
    1. Re:Options... by Anonymous Coward · · Score: 0

      Whether this patch is added or not is surely just a question of whether it is stable enough or not.


      You've obviously never dealt with Linus before...

  41. Re:Windows 95 by Anonymous Coward · · Score: 0

    Windows 95 was released in 1996, don't you remember?

  42. Linux Devices Article by Alien54 · · Score: 4, Informative
    The Linux devices article link should be:

    http://www.linuxdevices.com/articles/AT4185744181. html

    Goofed that up.

    Nice discussion, from Sept 6, with related links

    [sigh]

    --
    "It is a greater offense to steal men's labor, than their clothes"
  43. Hmm? by Anonymous Coward · · Score: 0

    Isn't this pretty much what RTLinux does already?

    1. Re:Hmm? by gmack · · Score: 1

      RTLinux is for specialised apps that need guarunteed sub millisecond responce times and is therefore more anal about preemption.

      AFIK the preemption patch doesn't come close to RT in guarunteed latency but on the other hand it doesn't incur the speed hit either.

  44. Re:So will that make Linux a superior audio platfo by Anonymous Coward · · Score: 0

    Those low latency patches have been around for a while. Why haven't they made it into the kernel?

  45. A better URL by foo · · Score: 1

    http://www.uow.edu.au/~andrewm/linux/schedlat.html

  46. Re:Microsoft Anthrax attacks by seann · · Score: 0

    They do what they do for a livng, to make money.

    Kind of like scalpers, who buy tickets and sell them in demand for higher prices.

    --
    I'm a big retard who forgot to log out of Slashdot on Mike's computer! LOOK AT ME.
  47. When will the Linux HZ be bumped up to 1000? by Anonymous Coward · · Score: 1, Interesting

    The last time I looked, the Linux process time slice HZ constant was an anemic 100. When will it finally be defaulted to a respectable 1000 so that programs that act on events are more responsive? You can't even make a smooth scrolling ticker on Linux without chewing up all the CPU if the HZ constant is 100 - too slow. I realize that more time will be spect in context switching - so be it - the time is miniscule.

    1. Re:When will the Linux HZ be bumped up to 1000? by Anonymous Coward · · Score: 0

      Yet another stupid HZ post from someone who doesn't understand UNIX schedulers.

      HZ only comes into play when you have fully CPU bound tasks. In that case, you want it to be fairly long, so that your tasks get maximum use out of your cache.

      You only care about latency for interactive tasks (time between hitting a key and seeing in on your screen, time between making a change and hearing it in the audio output, etc, etc). If you correctly set the priority of the process for which you care about latency way up, a preemptable kernel will reschedule whenever the higher priority process is ready to run (ignoring the timeslice completely).

      Your smooth scrolling ticker problem is that sleep (2) is limited to multiples of the timeslice. Fix the bug, not the symptom. Systems like UTIME are a far better solution.

    2. Re:When will the Linux HZ be bumped up to 1000? by Anonymous Coward · · Score: 0

      You dumb shit - with HZ set to 100 the finest grained timeslice you can have for select() (or poll) is 50 HZ (100/2). 50 Hz is not enough for most realtime applications without completely monopolizing the CPU. Don't worry, jackass, you can keep you system set to 10 HZ for all I care so you can maximize your cache hits. I personally run Linux at 1000 HZ so I get more even scheduling from everything from X window socket events to realtime audio.

    3. Re:When will the Linux HZ be bumped up to 1000? by Anonymous Coward · · Score: 1, Informative

      HZ only comes into play when you have fully CPU bound tasks.
      Bzzzt! Wrong. It is also determines the minimim timeout for poll() and sleep(). Please post only when you have something of value to say.

    4. Re:When will the Linux HZ be bumped up to 1000? by Anonymous Coward · · Score: 0

      Perhaps you would use sleep() (with a minimum of ONE second resolution) for a smooth-scrolling ticker, but I would not.

    5. Re:When will the Linux HZ be bumped up to 1000? by Anonymous Coward · · Score: 1, Interesting

      This article describes how the HZ value of 100 is obsolete for modern processors and should be increased to 1024. But the problem is that most user-level code is broken in that it assumes the Linux HZ constant is, well, constantly 100.

    6. Re:When will the Linux HZ be bumped up to 1000? by ivan256 · · Score: 2

      HZ is already 1024 on architectures such as Alpha and IA64. You have the source. Change it before you build; it's only a 2 byte change.

  48. Re:So will that make Linux a superior audio platfo by Anonymous Coward · · Score: 0
    Look at BeOS for an example of why this sort of processing can't possibly fit into a normal-use system. BeOS was constructed especially for the handling of low-latency media such as audio, but as anyone who tried to program it can tell you, it was exceptionally difficult to program anything other than media apps with it! The extremely high-resolution threading of the operating system made even the simplest programming tasks near impossible, as mutex locks and thread conditionals needed to be spread throughout the code to ensure proper execution. This is why BeOS ultimately flopped: it was too hard to program for.
    BeOS hard to program for? Are you insane

    Oh.... wait.... are you one of those people who can't compile their own kernel???

    If you had done any research at all, and had looked at the source code for a BeOS application you would not be making a comment like this.

    I know different individuals have different ideas of what difficulty is, and I am no great programmer, but I can tell you that BeOS is one of the easiest operating systems to program under. BeOS flopped for many other reasons that are not really for discussion here.

    After seeing that somone else has also made a point of saying "your wrong" I hope you get that posting score reduced from a +5 to a -5.

  49. Re:So will that make Linux a superior audio platfo by be-fan · · Score: 2

    BeOS programming really isn't that hard. You just have to get used to the idea of locking every single thing that could possibly be shared.

    --
    A deep unwavering belief is a sure sign you're missing something...
  50. Re:So will that make Linux a superior audio platfo by Vlastyn · · Score: 1

    I would just like to add that I'm using an RME Hammerfall on Windows 2000 with 3ms latency. Works fine.

  51. Problems applying the patch by geoffeg · · Score: 1

    I downloaded linux 2.4.12, unzipped it to make /usr/src/linux, downloaded preempt-kernel-rml-2.4.12-1 and did "patch -p0 preempt-kernel-rml-2.4.12-1.patch" and got tons of errors and warnings from patch along the lines of:

    Hunk #1 FAILED at xx.

    What am I doing wrong here?

    Geoffeg

    1. Re:Problems applying the patch by philipm · · Score: 0

      this is a patch for emacs, not the kernel. Don't be mislead by all the talk of the thread in the kernel using too many resources. One, its not a thread, and two, its for emacs, which usually causes the problem.

      Read the article, you are supposed to apply it to emacs 20.4.3.

    2. Re:Problems applying the patch by Anonymous Coward · · Score: 0

      try:
      patch -p1 preempt-kernel-rml-2.4.12-1.patch

      that should work for you...

    3. Re:Problems applying the patch by Anonymous Coward · · Score: 0

      patch -p1 < preempt-kernel-rml-2.4.12-1.patch

  52. i could be wrong by Anonymous Coward · · Score: 0

    But Darwin is built on top of the Mach microkernel, no? So most of the normal kernel-y stuff will already be in userspace, reducing the need for kernel pre-emption.

    1. Re:i could be wrong by JanneM · · Score: 1

      Except that then there's latencies in the Mach kernel to worry about.

      Agreed, a microkernel _should_ have a lot less latency due to its organisation (though I have heard differently about Mach). I really should take a better look at the internal architecture.

      /Janne

      --
      Trust the Computer. The Computer is your friend.
  53. This is an AWESOME patch! by EricLivingston · · Score: 1
    I just downloaded the patch, applied it, and recompiled my kernel. I can say I DO notice a snappier response overall when starting several large programs simultaneously (in the sense that I can continue doing other things and it's not so "jumpy").

    Also, and this is key, the audio in my test game (Loki's Tribes 2 port) DEFINATELY syncs up better with on-screen action, making me think that this type of patch is an incredible boon for us Linux gamers.

    --
    Please Rate my comment (and help support Fre
    1. Re:This is an AWESOME patch! by Anonymous Coward · · Score: 0

      You seriously need to get a life.

    2. Re:This is an AWESOME patch! by EricLivingston · · Score: 1

      Anonymous fool - why should I get a life? Because I tried the patch? Because I enjoy getting better response from my machine? Because I enjoy playing games? Playing games on Linux? Your inane proclamation makes me laugh. You might think of spending more time on positive thoughts - loser. :)

      --
      Please Rate my comment (and help support Fre
    3. Re:This is an AWESOME patch! by philipm · · Score: 0

      dude, you are so gay! i just downloaded the patch and applied it to the latest emacs distribution and it made emacs display a little picture of deodorant, followed by a picture of a beast bearded dirty gnu hippie (come one! you know who it is!).

      Because of you I am going to kiss bill gates.

    4. Re:This is an AWESOME patch! by Anonymous Coward · · Score: 0

      Hey, moron, heres a multiple choice quiz for you: Which of the following is sadder and more pathetic?

      (1) Someone who plays games on Linux.

      (2) Someone who gets off writing "get a life" messages to strangers on slashdot.

      If my life was as sad, vapid, pathetic, empty, boring, meaningless and insubstantial as case (2), I would kill myself.

  54. Re:So will that make Linux a superior audio platfo by sllort · · Score: 3, Troll

    The extremely high-resolution threading of the operating system made even the simplest programming tasks near impossible, as mutex locks and thread conditionals needed to be spread throughout the code to ensure proper execution.

    Right on! I ran BeOs under VmWare to try developing for it, and the pthreads compatibility was... well let's just be polite and say "extremely non-optimal". The spin locks in the kernel were so tightly placed that any possible race condition you could think of would occur if you didn't mutex lock the hell out of it, and the littany of devices you had to lock to access memory was just unbelievable. I pretty much had to read through the video driver code to get anything done as the documentation got as far as "Hello World" before wishing you luck.

    Anyway, DeMuDi looks to be a step in the right direction - maybe if a Linux distro starts shipping with 2 kernels, a standard kernel and a multi-media enhanced kernel, we'll finally have a workable solution.

  55. Re:So will that make Linux a superior audio platfo by Anonymous Coward · · Score: 0

    The API's are relatively simple, in fact BeOS is one of the only O/Ses you can read people calling a joy to code for.

    The other is AtheOS.

  56. Re:So will that make Linux a superior audio platfo by Starship+Trooper · · Score: 0
    Anyway, DeMuDi looks to be a step in the right direction - maybe if a Linux distro starts shipping with 2 kernels, a standard kernel and a multi-media enhanced kernel, we'll finally have a workable solution.
    I think having a distribution with two kernels would be overkill; what I had more in mind was something like DeMuDi being used in a dedicated sound-processing box (like Fostex's digital multitrackers, except cheaper since they wouldn't require proprietary software and hardware interfaces). I think a digital multitracker/mixer/signal processor unit running a specially-tuned Linux kernel on cheap commodity x86 hardware would be a huge boon to independent artists who don't have the thousands of dollars to spend on proprietary solutions.
    --
    Loneliness is a power that we possess to give or take away forever
  57. Re:So will that make Linux a superior audio platfo by Anonymous Coward · · Score: 0

    Yeah, it's very odd that people seem to find using Lock() & Unlock() pairs on objects tough. This is going from experiences with AtheOS, but it isn't hard to remember (& you can get away with a lot if you're just coding some sloppy code for yourself. My own code rarely locks any objects before it does something with it, and doesn't lock up)

  58. Re:So will that make Linux a superior audio platfo by Error27 · · Score: 2

    "Professional audio processing requires an extremely special form of real-time processing that is pretty much only good for handling audio, and which actually can cause problems with any other types of software."

    Special in what way? I'm not really familiar with audio software but I have a hard time picturing what you mean by "special" real-time.

    You say that in Windows software handles it's own scheduling and bypasses the kernel. What exactly does that buy you that you couldn't get more elegantly in Linux by creating a kernel patch (A premptable kernel patch for example). The windows way strikes me as not very stable, flexible or good.

    Linux let's your program hog the cpu already by setting nice levels. With preemption even if it gives the cpu to a different process it can take it back right away.

    The Linux way seems better exactly because it's not a special purpose hack. Why is hogging the cpu for audio processing any different than hogging the cpu for video processing?

  59. Re:This is an AWESOME patch! [OT] by error0x100 · · Score: 1

    Don't let the loser bother you. Consider: a person who has nothing better to do with his time than sit on slashdot randomly telling strangers to "get a life" seriously needs to get a life himself. I can't even imagine how sad and pathetic someone's existence must be for that to be the high point of their day. Nobody who really had a life would be doing that, it doesn't make sense. I'm not claiming I have a life, but I haven't sunk that low yet :)

  60. Re:LOOK, NO CHARACTERS! (by keesh) by Anonymous Coward · · Score: 0

    Your induction is flawed. You've showed an example where n=0 and where n=1 (which *just happens*, by coincidence, to be 1 more than the previous one), but you HAVE NOT SHOWN specifically the case of "n+1" characters (i.e. given any "n", that "n+1" will be troll post). You've showed that "0+1" in your example was true, but demonstrating "0+1" is vastly different from demonstrating "n+1". Go back to class.

  61. Re:LOOK, NO CHARACTERS! (by keesh) by philipm · · Score: 0

    you are a cocksucker. He did too show that if n was a troll, n+1 would be a troll. Besides, its fucking obvious. I mean, really! If I have a link to goatsex, and then say good slashbot, I am still a troll.

  62. Is this reconfigurable without rebooting? by Daffy+Duck · · Score: 1

    Does anyone who's installed this thing know if you can switch kernel preemption on and off on the fly (through /proc or something)? And if not, how difficult would that be to achieve? Sorry, I'm not a kernel hacker so I have no clue how to find this out from the source.

  63. Re:So will that make Linux a superior audio platfo by be-fan · · Score: 2

    True, also, you can always chicken out and use big global locks if you need something quick.

    --
    A deep unwavering belief is a sure sign you're missing something...
  64. Just need pcmcia-cs to be updated! by JahToasted · · Score: 2, Informative

    Tried this patch before... it works great adds a nice option in the kernel config. But the problem is pcmcia-cs doesn't work with it. Says in the changelog it will be fixed on the next release of pcmcia-cs but I want it now!
    It does work nicely... everything is a lot more responsive.
    Great work!

  65. A few problems I've noted by bruns · · Score: 3, Informative

    After messing with it on several machines, here is what I have found.

    * it doesn't work well on a shell server or anything which might have alot of disk activity. The changes seem to do everything at the expense of disk IO and network IO. I do see better speed on interactive stuff though. Its not worth the hit in IO.

    * there is no option to turn it off while in operation. Means you have to run different kernels if you want to do some things with the preempt, and other stuff without.

    --
    Brielle
    1. Re:A few problems I've noted by Lethyos · · Score: 2

      * there is no option to turn it off while in operation. Means you have to run different kernels if you want to do some things with the preempt, and other stuff without.

      This is something I haven't seen brought up yet. Windows 2000 can change favor from background to foreground processes on the fly (right click 'My Computer' and check out the properties). Now while, this is not the same thing, it's in the ballpark to most users who understand it as something that speeds up their apps. We really need a /proc switch that lets you turn this thing off and on.

      --
      Why bother.
    2. Re:A few problems I've noted by Johnno74 · · Score: 1

      Windows 2000 can change favor from background to foreground processes on the fly (right click 'My Computer' and check out the properties)

      That doesn't change NT's pre-emption behavior dude. NT automatically boosts the priority of the process that owns the topmost window, to make the UI Snappier... that option just turns this on or off.

      NT/2K also uses varying process quantums depending on if you are using it as a server or workstation, but I don't think the favour background/foreground processes option tunes this... I'm pretty sure the quantum length is the only (major) difference between NT server/workstation or W2K pro/server. Longer quantum = lower context-switching overhead = more throughput.

    3. Re:A few problems I've noted by Lethyos · · Score: 2

      My original post: Now while, this is not the same thing, it's in the ballpark to most users who understand it as something that speeds up their apps.

      Your post: That doesn't change NT's pre-emption behavior dude.

      Actually, you are incorrect, and you back me up with your own words:

      NT automatically boosts the priority of the process that owns the topmost window, to make the UI Snappier... that option just turns this on or off. It's not the same thing, but it's very similar.

      So basically, you're turning preemption on and off. That's not a priority change - apps keep their priority mode (one of the top level 5 that is). With NT, the active process, top most window, preempts others that are running. That's how they make it seem like it's running faster. For Joe S. Admin, switching to the other setting, causes local procs to not preempt those that are running server software, thus increasing throughput.

      Of course, UI speed in NT is a totally different matter from under *nix. The Windows GUI is faster because it's not networked, like X. There's no abstraction layer between the producer (server), and consumer (client).

      --
      Why bother.
    4. Re:A few problems I've noted by spitzak · · Score: 2
      The X interface is not slow due to the network abstraction, it is slow because of incredibly bad design of the Xlib calls themselves, requiring a huge amount of synchronous calls to the server. The network abstraction could actually speed things up enormously by providing a convienent way to batch tens of thousands of calls into a single context switch, if it were not for the enormous number of calls that return a value from the server and thus require synchronization.

      As to the original subject, I think there is some confusion on both sides. That NT provides a user-friendly method of controlling things is a point in it's favor over Linux where the designers insist that nothing be easy for the end user. However it is true that the NT switch is equivalent to the Unix "nice" command that existed decades before anybody dreamed of pre-emptive kernels.

      Personally I would like to see a system were there were as few controls as possible. Any kind of adjustments like this indicate to me that the designers really don't know how to get performance as good as possible. If games require different scheduling than seti@home, I would like to see a kernel that recongnizes the behavior of the programs and adjusts. This would be way better than requiring the user to do this, no matter how user-friendly the button is!

  66. Re: PCMCIA-CS works here ... by Anonymous Coward · · Score: 0

    I don know if it's supposed to be broken in 2.4.12 but i have compiled with the preemtive kernel with 2.4.10 (the patch linked in the 2.4.10 kernel anouncement here) and my NIC is a pcmcia card (i an not connected through a modem). Hence, it must be working.

    Had to compile everything pcmcia related it into the kernel (non module), except for the lan card driver.

  67. Sweet by fizban · · Score: 1

    Excellent work on this. It's a wonder that the a fully preemptive kernel wasn't introduced a long time ago, but I guess it depends on what your view of the purpose of Linux is.

    1. Is it a server OS, built to handle a large amount of processing and get it done as fast as possible

    or

    2. Is it a workstation OS, built with from a user's perspective, with responsiveness and ease of frustration as the most important elements.

    If you look at it this way, I guess it is easy to see why the preemptive kernel wasn't brought in before now, because up until only recently, Linux really was thought of as a server OS. But now that it's trying to become more user friendly to the general populace to more easily spread its love, #2 starts eclipsing #1 for attention.

    It is a good thing that they are making it a sysem option, because then you can choose which mode is more important for YOU.

    --

    +1 Insightful, -1 Troll. What can I say, I'm an Insightful Troll.

  68. Informative? by Kalani · · Score: 1

    He didn't even answer the guy's question.

    And anyway, threading never caused a BSOD in Win9x. He's on crack.

    --
    ___
    The ends are ape-chosen, only the means are man's. -- Aldous Huxley
    1. Re:Informative? by jeffy124 · · Score: 1

      yeah i did.

      he asked what's the deal with pre emptive. and I told him and told him what OS's use it and a few that didnt

      --
      The One Rule Of Chess You'll Ever Need: Don't play someone who carries a kit in their bookbag.
    2. Re:Informative? by Kalani · · Score: 1

      He asked what "preemption" meant in the context of a "fully preemptable kernel."

      --
      ___
      The ends are ape-chosen, only the means are man's. -- Aldous Huxley
  69. Re:So will that make Linux a superior audio platfo by scrytch · · Score: 2

    This is why BeOS ultimately flopped: it was too hard to program for.

    True, but in a very different way. The lack of decent developer support, for a platform running on hardware most people use windows on, aimed at the market that people buy macs for, compatible with less actual hardware than either, with no software from vendors anyone had ever heard of, is why it flopped.

    I liked BeOS too. I ultimately wiped it off my system because I just didn't have a use for it.

    --
    I've finally had it: until slashdot gets article moderation, I am not coming back.
  70. developer response by Simm0 · · Score: 1

    Response from one of the head developers:

    [simm0@mercury ~]$ finger brennan@nullsoft.com
    [nullsoft.com]
    Login: brennan Name: Brennan Underwood
    Directory: /home/brennan Shell: /usr/local/bin/tcsh
    On since Sun Oct 14 18:17 (PDT) on ttyp0, idle 1:05, from 64.105.36.233
    New mail received Sun Oct 14 19:20 2001 (PDT)
    Unread since Sun Oct 14 19:05 2001 (PDT)
    Project:
    Why, none other than architect and head such-and-such for Winamp 3.0.
    Codename Wasabi. Why this fails to get me all the chicks I'll never know.

    Plan:
    14-Oct-2001

    Dear /.

    We ported it to Linux because we *like* Linux. Calm down.

    Sincerely,
    Brennan

  71. Re: PCMCIA-CS works here ... by JahToasted · · Score: 2, Informative

    yeah the one I tried was with 2.4.10 didn't work. my card's driver isn't included with the kernel so I have to compile the pcmcia driver that comes with the pcmcia-cs package (why IS there 2 different drivers?). I checked the changelog on the pre-emptive kernel page and it mentions that they are pressing the maintainers to fix the code for pcmcia-cs for the next release which I hope is soon.

  72. Re:needed badly (netscape freezing X) by Anonymous Coward · · Score: 0

    This happens to mee too when I use netscape 4.7x (ie, not mozilla). If I hit the "back" button repeatedly very quickly (when there is a few pages available to back up), it'll lock up X (the pointer works, but no clicks or key input gets to the apps). CTRL-ALT-BACKSPACE does no good; but telnetting in and killing netscape does (X goes back to normal)

    I'll have to try this with the pre-emption patch (for curiosity; I've switched to better browsers)
    Most likely it is a X problem.

  73. Re:So will that make Linux a superior audio platfo by WNight · · Score: 3, Informative

    Anywhere that BeOS highlighted your race condition by causing unwanted behaviour is somewhere that you'd get "random" crash bugs from in another OS if you didn't fix the code.

    Other OSes don't guarantee much about how long your timeslice is, or how often you'll get time, it's sort of haphazard. That randomness means that while those race conditions don't manifest as much, they're still there to bite you.
    Think of it like memory leaks and dangling pointers. Ninety-nine times you can use an element of a linked list after delinking it, one time it will have already been written over. But you don't want to somehow make the bug come up one in a thousand times... you want it to come up EVERY time so that you fix the problem before release.

    It might be a bit of a pain to put locks around everything, but after a while it becomes quick and natural and you still have the power of a fast kernel with a very small timeslice for when you need it.

  74. Re:So will that make Linux a superior audio platfo by WNight · · Score: 2

    Those locks you're leaving out of your non-BeOS code might make it easier to code, but they mean it'll crash at random years later when some odd combination of load variables causes your program to be yanked out of a critical area before completion and lets the next thread enter too soon. But you'll have run it for months, seen no problems, and shipped it.

    You *need* to lock everything that might ever be an issue, even if it's the tiniest operation. That's why there's a "Test & Set" operation in ASM. It might be the tiniest thing, but you need to guarantee it's atomic.

    I wish more OSes were hard in the way you describe - if race conditions were more easily shaken out they wouldn't plague "release caliber" software.

    And as to BeOS being hard to program for... What?!? It might have enforced better style which could be a pain at first, but it was (is still, I guess) a wonderful OS for programmers.

  75. The truth no one wants to admit by Ukab+the+Great · · Score: 2

    The desktop end-user *is* a real-time application

  76. MS & Anthrax... by Anonymous Coward · · Score: 0

    You know, some things just aren't black and white.

  77. Re:So will that make Linux a superior audio platfo by Webmonger · · Score: 2

    The pre-emptible kernel patches radically rework the way the kernel functions. So people are being cautious.

  78. Linus is suspicious by steveha · · Score: 3, Informative
    In his recent interview on osnews.com, Linus said he was in no hurry to include the kernel preemption patches in the official kernel source. He said:

    Some people have been playing with using the [SMP] locks on UP too, creating a fully preemptible kernel. A lot of people are playing around with the patches, and we'll see when/if I'll integrate them into the standard tree. It's not a high priority for me: they don't add performance (like the SMP scalability does), and if they improve latency noticeably I'd really rather look at why the latency is bad in the first place.

    So right now as far as I'm concerned it's one of those "cool features" things, and it will need some prodding from the real world to show whether it is worth it.

    I was surprised he said this. This isn't a big scary kludge that inserts a bunch of hacks all over the place in the kernel; this is a relatively small patch that simply leverages all the SMP work. It won't make the kernel uglier or harder to maintain, so IMHO it is very worth adding.

    I am confident that Linus will get that prodding from the real world he is waiting for, because my own experiences with this patch are overwhelmingly positive. I'm using kernel 2.4.10 with the preemption patch on my desktop Linux boxes, and I love the snappy feel it gives my system. Playing back MP3 music never skips now, and my K6-III/450 system pops up web pages in Galeon so fast it feels like an Athlon system.

    Kudos to Robert Love and anyone else who worked on this patch.

    steveha
    --
    lf(1): it's like ls(1) but sorts filenames by extension, tersely
    1. Re:Linus is suspicious by spitzak · · Score: 2
      Linus: and if they improve latency noticeably I'd really rather look at why the latency is bad
      in the first place.


      I don't really agree with this. I would imagine that there are many things in the kernel that could be written much cleaner, smaller, and faster if the writer did not have to worry about latency. Since making the kernel pre-emptable would allow this I could see things actually improving as a result.

      PS: I don't know anything about kernel design, so ignore my comment if necessary...

  79. Re:Public Service Announcement from Brokaw & T by Xoro · · Score: 1

    Yeah, this puts the kernel right up there with the Emmys!

    Will Joan Rivers be there for the 2.5 rollout?

    --
    Kill, Tux, kill!
  80. The Spinlock Problem by Taco+Cowboy · · Score: 1



    As shown by the chart from the Real-Time Benchmark Result - available at [ http://kpreempt.sourceforge.net/ ] - we can see that the spinlock problem is preventing the pre-emptive kernel to achieve its true potential.

    Therefore, is there ANYONE out there doing anything to solve the spinlock problem?

    --
    Muchas Gracias, Señor Edward Snowden !
  81. Not if the Spinlock Problem is NOT remedied !!! by Taco+Cowboy · · Score: 1



    True reduction of latency will NOT happen as long as the Spinlock problem is still plaguing Linux.

    As shown by the chart from the Real-Time Benchmark Result - available at [ http://kpreempt.sourceforge.net/ ] - we can see that the spinlock problem is preventing the pre-emptive kernel to achieve its true potential.

    Therefore, is there ANYONE out there doing anything to solve the spinlock problem?

    --
    Muchas Gracias, Señor Edward Snowden !
  82. Re:So will that make Linux a superior audio platfo by bfree · · Score: 2

    And are you a Linux user? If so PLEASE go and get demudi up and running on that box and see what latencies you get there for comparable tasks and then come back and tell us! Demudi is spawned from the Hammerfall's ability to offer (Semi-)Professional audio capabilities to Linux. I have a Hammerfall about 5 metres from me at the moment, but it's not mine and I would be beaten severly if I touched it :-(

    --

    Never underestimate the dark side of the Source

  83. Problem with VMWare and this patch by aldjiblah · · Score: 1

    Using a kernel with this patch to run vmware, I experience long halts in both systems (linux and windows98/vmware). They both freeze for several seconds each, waiting for something. This happens a couple of times every minute. Anybody know what's up?

    --
    sig sig sputnik
  84. Re:So will that make Linux a superior audio platfo by Anonymous Coward · · Score: 0

    So people are being cautious...

    on this issue :)

  85. A potential problem.. by Junta · · Score: 2

    I don't know how this might manifest itself, but I could see how some existing, highly tuned programs could have problems with such a patch. If software is developed with the current mainstream kernel in mind, it may make certain internal assumptions about not being preempted during certain operations, and some timing getting messed up because of that. One poster mentioned a potential VMware problem, which could be an effect of something like this.
    I would like to see this patch in there, but I could see some reasons to be hesitant about putting it in now. I would love to see latency on the level of QNX, that seems very responsev..

    --
    XML is like violence. If it doesn't solve the problem, use more.
  86. Love and Morten patches compatible? by Anonymous Coward · · Score: 0


    I'm compiling the Love patch as I type, but am interested if the Morten patch will co-exist happily with the Love patch?

  87. Re:So will that make Linux a superior audio platfo by chrish · · Score: 1

    Considering that BeOS has no pthreads library, I'm not surprised that you weren't impressed with its pthreads compatibility.

    And the "littany of devices you had to lock to access memory"... uh, ok. Sure. malloc() and friends must have slipped your mind.

    Unless you were working on specialized low-level stuff (you don't say), you're totally blowing smoke and FUD. Doing POSIX programming... no need to worry about threads or locking or anything (well, maybe you'd worry about sockets not being file descriptors). Doing GUI programming, you lock your window when you access it and unlock it when you're done... not a big deal, and not a totally alien concept.

    BeOS was by no means perfect, but it certainly wasn't pure hell to program.

    *shrug*

    --
    - chrish
  88. OS X by Satowai · · Score: 1

    OS X has been mentioned once -but no one pointed out the following link: http://developer.apple.com/technotes/tn/tn2028.htm l#MacOSXThreading You have to scroll down to reach the section about kernel threading.

  89. Re:So will that make Linux a superior audio platfo by Anonymous Coward · · Score: 0

    Great, here we go again. Yet another OS that will get plugged where it isn't welcome.

  90. Re:LOOK, NO CHARACTERS! (by keesh) by Anonymous Coward · · Score: 0

    He did too show that if n was a troll, n+1 would be a troll

    No, he didn't. Here is a further example demonstrating the flaw he DID make, since some people here are missing it. I will prove, by induction, that "n squared is always less than 10".

    Step 1: For n=0, 0^2 = 0. Since 0Step 2: For n=1 (which is 1 greater than 0), 1^2 = 1. 1See the flaw yet? My hypothesis is flawed (try it for n=8), but I have "proven" it by induction in the same way he did. Come on, this is not that hard. In my "induction proof", it is merely a *coincidence* (essentially) that my hypothesis HAPPENED to be true for n=0 AND n=1, and I managed to prove it for "0" and for "0+1", but I *did not* prove it for "n+1", even though substituting n with 0 fits into the "0" and "0+1" example.

  91. Re:LOOK, NO CHARACTERS! (by keesh) by Anonymous Coward · · Score: 0

    (Sorry for repost, posted in wrong format)

    "He did too show that if n was a troll, n+1 would be a troll"

    No, he didn't. Here is an additional example demonstrating the flaw he *did* make. I will "prove", by induction, that "n squared is always less than 10" (which naturally is an incorrect hypothesis ...)

    Step 1: For n=0, 0^2 = 0. Since 010, my hypothesis is true for n=0.

    Step 2: For n=1 (which is "0+1", i.e. 1 is "1 greater than 0"), 1^2 = 1. 110. Thus, I have "shown" that for n+1 (i.e. "0+1"), "n squared is always less than 10".

    See the flaw yet? My hypothesis is flawed (try it for n=8), but I have "proven" it by induction in the same way he did. In my "induction proof", it is merely a *coincidence* (essentially) that my hypothesis HAPPENED to be true for n=0 AND n=1, and I managed to prove it for "0" and for "0+1", but I *did not* prove it for "n+1", even though substituting n with 0 fits into the "0" and "0+1" example. Somewhere in the inductive step proof, you actually still need an "n" to appear (or "k" is also used in texts) (e.g. a proof that "(k+1)^2 10" - obviously not provable in this case, but if that inequality could be proved, then my induction would have been proved).

  92. Re:LOOK, NO CHARACTERS! (by keesh) by philipm · · Score: 0

    look you moron.
    The assumption is that a post with n characters is a troll.

    Assuming that, is a post with n+1 characters a troll?

    Of course it is you dhiarhetic ally mcbeal eating homosexual wiccan conspiracy cult member.

    Reality check here:

    Here is a post:

    :Natalie Portman, hot grits?

    It is a troll and moderated as such.

    add one character to this post, any character and it will still be a troll!

    You, sir, are a moron.

  93. Re:LOOK, NO CHARACTERS! (by keesh) by Anonymous Coward · · Score: 0

    Of course it is you dhiarhetic ally mcbeal eating homosexual wiccan conspiracy cult member

    I am not diahretic!!!!

    add one character to this post, any character and it will still be a troll!

    Thats just one example. I can show you plenty of examples where n and n+1 will BOTH satisfy a given *incorrect* hypothesis, for certain specific values of n. Actually I already *have* given an example, but you were obviously too stupid to understand the explanation, so instead you just lashed out. Shame.

    Good luck with your induction courses. You'll need it. Actually, on second thoughts, *you* won't be needing it, because you don't need to understand induction to ask people "do you want fries with that?" Myself, I passed those courses and got my degree years ago.

    You, sir, are clearly clueless w.r.t. induction.