Subj : Re: Solaris real-time thread capabilities To : comp.unix.solaris,comp.programming.threads From : Greg Menke Date : Wed Sep 07 2005 09:46 am Logan Shaw writes: > Casper H.S. Dik wrote: > > capnwhit@yahoo.com writes: > > >>Hello Eric, Thanks a lot for your reply! Code sample coming up... I > >>basically kept track of the maximum latency between t1 and t2 (as shown > >>in my while loop on my initial post)... the average latency was about > >>1000 ns (over a 5 minute period) but the max latency was 323,000,000! > >>I'll post the sample code shortly... > > > Well, *that* is not impossible. That's because your program was > > hit by a context switch and other processes got to work for apparently > > a lengthy period of time; and if that meant that you later induced a > > page fault, 300ms could easily be explained. > > I puzzled over this for a while. > > If he creates a processor set and puts his program as the only process > in that set, and if he makes his thread realtime class and sets the > priority to the maximum, and if he sets that processor to no-intr state, > then how can another thread preempt that thread? > The OP has not yet proven that his program is bug-free and not making incorrect assumptions. Its more likely the problem is there than in the scheduler. I ran his test program which he says demonstrates the problem, after correcting some math errors and getting rid of the printf inside his inner loop, I found no particular scheduling jitter when running it as an RT task on the default processor set along with everything else- including running Openoffice, Acrobat, mozilla, emacs, etc.. Gregm .