Messages in this thread | | | Date | Mon, 29 Jan 2001 10:38:10 -0700 | From | yodaiken@fsmlabs ... | Subject | Re: [linux-audio-dev] low-latency scheduling patch for 2.4.0 |
| |
On Mon, Jan 29, 2001 at 11:23:24AM -0600, Joe deBlaquiere wrote: > It doesn't matter how you do it, the cooperative model eventually starts > to feel like Windoze3.1 in the extreme case, but even so, it was much > more multithreaded than DOS. Of course, the Right Thing (TM) is to do > away with the cooperative model. But even in a preemptive model, there's > no reason to have code like
So we assume: if you have no RT threads running, Linux does the right thing. If you have RT threads running, you want them to run no matter what Linux does. This may be over-simple, but it's robust. Otherwise you end up with either (A) an impossible to verify mess of many code components each hoping that the aggregate of the others will behave correctly or (B) a semi-functioning high overhead centralized priority system that slows everything down and probably does not work anyway.
> > while (!done) > { > done = check_done(); > } > > when you can have: > > while (!done) > { > yield(); > done = check_done(); > }
But there is a reason for the first: time.
while(!read_pci_condition); // usually finishes in 10us
versus
while(!read_pci_condition)yield(); // usually finishes in 1millisecond
can have a nasty impact on system performance.
> > being preemptive and being cooperative aren't mutually exclusive. > > Borrowing your sports car / delivery van metaphor, I'm thinking we could > come up with something along the lines of a BMW 750iL... room for six > and still plenty of uumph.
Not a cheap vehicle. Linux is pretty snappy on an AMD SC420 or a M860 and 5 meg of memory. And it scales to a quad xeon well. Don't try that with IRIX. So to push my tired metaphor even further beyond the bounds, a delivery van that needs jet fuel and uses two lanes, won't do well in the delivery business no matter how well it accelerates.
-- --------------------------------------------------------- Victor Yodaiken Finite State Machine Labs: The RTLinux Company. www.fsmlabs.com www.rtlinux.com
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org Please read the FAQ at http://www.tux.org/lkml/
| |