Subj : Re: mutex&threads To : comp.programming.threads From : steve Date : Mon Mar 21 2005 09:10 pm In article , Valerio Bardelli wrote: >I've a big problem with a porting of linux on a mips board (based on IDT >R4K). The problem is about mutex, threads and scheduling. Actually, your problem is about real-time operating systems, or current lack thereof. [ snip ] >I've monitored the duration of my routine at priority 99 (A) (attached to >the interrupt via device driver) and I'm very surpriesed to see that, >sometimes, but often, my routine duration is about 20ms. Normally my >routine duration is about 100us (micro sec). You basically have two choices: 1) Upgrade to a more current Linux that has kernel preemption support, or 2) Upgrade to a real RTOS. If you have a hard scheduling requirement that is in the hundred microsecond range, I know a "normal" Linux won't get there. A Linux kernel with preemption will usually get there. If you require 100% guarantees, you need a real-time operating system. I know LynxOS has a Linux binary emulation that I understand works quite well, and it's also reasonably source-compatable. Other RTOSes may be able to help, as well, depending on how much you're willing to modify your application. Disclaimer: I worked at Lynx^WLynuxworks for 8 years. -- Steve Watt KD6GGD PP-ASEL-IA ICBM: 121W 56' 57.8" / 37N 20' 14.9" Internet: steve @ Watt.COM Whois: SW32 Free time? There's no such thing. It just comes in varying prices... .