Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: latency



On Feb 20, 2004, at 8:46 AM, Dirk Schelfhout wrote:

>> from the man page :
>>
>> The arguments are as follows:
>>
>> -rt Set real time scheduling policy. Default policy is
>> timeshare.
>
> so does this change it until the next reboot ?
> Or only as long as this command runs ?

It only has an effect on the thread running inside the latency tool
itself. It makes that thread run as real-time (time constrained,
specifically). So, it gives a good indication of what a realtime
thread could expect under various loads.

Since the iTunes audio thread also runs as a time-critical thread, you
can run "latency -rt" instead of iTunes to get an idea of the
scheduling challenge iTunes faces under a particular background load.
Running it at the same time as iTunes will really just be measuring the
effect that iTunes has on other parallel realtime threads. This is
interesting to the developer of iTunes or other realtime threads
designed to run in parallel with iTunes, but otherwise doesn't appear
to be what you are really after.

I suspect that you won't find any major issues trying to schedule
iTunes' audio thread. If I am interpreting your test scenario
correctly, it appears you're already seeing less than 1ms worst case
scheduling latency for a second realtime thread with iTunes already
consuming much of that time itself). More than likely the issue
resides with the other (non-realtime) threads in iTunes that are trying
to feed data to the time-constrained audio thread. Something is
keeping them from performing correctly. Again, it could be scheduling
related (running latency without the "-rt" option would help determine
that), but I'd bet it is an I/O latency issue of some kind. Of course,
the only way to know for sure is to know how much buffering iTunes does
between these threads and the audio thread. And I don't know that
answer.

--Jim

[demime 0.98b removed an attachment of type application/pkcs7-signature which had a name of smime.p7s]
_______________________________________________
darwin-development mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/darwin-development
Do not post admin requests to the list. They will be ignored.

References: 
 >latency (From: Dirk Schelfhout <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.