Subj : Re: mutex&threads To : comp.programming.threads From : loic-dev Date : Mon Mar 21 2005 03:08 am Hello Valerio, > 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. which Linux kernel / libpthreads versions are you using? > 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). How did you monitor the duration of your routine? > I don't understand this problem about linux scheduling, because I think that > when my thread at priority 99 (A) preempts the thread at priority 98 (B) > after mutex lock then treads A stops on mutex, then starts the thread B > that unlocks the mutex and, I hope, the scheduler runs again my thread A at > priority 99... so, after this, I should have the dalay of the for cycle of > 1000 in the thread B that is around few micro seconds, not tens of ms. Is > this correct? Theoritically yes. But there might be some scheduling latency here... Cheers, Loic. .