Reducing interruption latency for feedback-loop
Reducing interruption latency for feedback-loop
- Subject: Reducing interruption latency for feedback-loop
- From: "CJ Bell" <email@hidden>
- Date: Wed, 7 Feb 2007 09:58:18 -0800
I'm trying to get a feedback-loop for a digital-analog converter
running at 40 kHz (or faster). Ideally, I would like to respond to
each sample as it comes and not let any back up.
This is essentially what I have so far:
thread_priority_set(...)
start
while(running)
{
if(sample is ready)
{
read/write
usleep(0);
}
}
stop
I have been able get it to run for 24 sec with only 100 to 200
interruptions that, each time, cause roughly 4 samples to back up --
on a 1.17 GHz dual-core G4, using a 3rd-party driver which
communicates via PCI. Since the device-manufacturer doesn't yet
provide PCI Express cards, I am unable to upgrade computers at this
time.
Any suggestions on how to reduce the interruption latency?
Using a multi-core computer, can I tell the scheduler to ensure that
the thread runs uninterrupted (well, with interruptions limited to 30
or 40 usec in latency) on a CPU at all times? Is it necessary to work
in the kernel to achieve what I'm looking for? Can I increase the
granularity of usleep()?
Thanks for your time!
-CJ
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden