[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Linrad] Re: Leif de Jeremy
- Subject: [Linrad] Re: Leif de Jeremy
- From: Leif Asbrink <sm5bsz.com; leif@xxxxxxxxxxxxxxxx>
- Date: Fri, 20 Feb 2009 13:37:25 -0400
Hi Alberto and All,
> > I will allow the ultimate call:SetPriorityClass(GetCurrentProcess(),
> > REALTIME_PRIORITY_CLASS
> > in the next Linrad version. Seems silly that such a thing would be required.
>
> IMHO that's a very bad ideea. When a process runs in the REALTIME priority class,
> the rest of the PC is almost frozen...
I have tried it on my laptop, dual core, but slow on battery.
I can not find any adverse effects.
Linrad actually needs priority for all of the processing
because it is vital to the user that the delay from antenna
to loudspeaker is kept low. Below 40 milliseconds or so for
QSK CW. Most of the delay is due to the filters.
For MAP65 I can not see any reason for fast response so
maybe normal priority with a limit for the max DMA rate at
maybe 50 Hz would work.
The cruicial thing is that no thread must be allowed to hold the
cpu for longer than a fraction of 1/DMA rate.
In case a large FFT is run without sleep statements at regular
intervals (inside e.g MAP65) Linrad must have the priority to
actually interrupt it unless the DMA rate is set low enough.
> If I interpret correctly what Joe said, maybe you should allow the user the specify as priority
> the Above Normal class, not for the process, but for the thread. So you leave the process priority
> at its normal level, but increase just the priority of the critical thread(s), i.e.
> SetThreadPriority((HANDLE) Handle, THREAD_PRIORITY_ABOVE_NORMAL)
> where Handle is the handle of the thread whose priority you want to increase.
> I use this in Winrad for the audio precessing worker thread, and it works beautifully.
Hmmm, all threads are critical in QSK mode. (except for keyboard input and mouse control,
threads that normally sleep.)
I do not quite understand what would be the problem. Linrad will not
use more CPU resources just by having highest priority.
I tried a couple of things on my laptop. With Linrad executing a Perseus
file at 1MHz with parameters that cause 50% CPU load on my (slow due
to battery operation) dual core machine I can see no problem on
any other application. FTP, Internet Explorer, PDF reader and a couple
of others. I can run a second instance of Linrad from the soundcard
at 2-channels, 48 kHz with 5% cpu load and it does not notice
that there is a 50% load already from the high priority process.
The other programs continue to work fine.
When I change the parameters to make the high priority process
show 80% while the other instance of Linrad is still at 5% things
do not work well any more. Launching the system monitor is slow
and it displays a CPU load of 96 to 100%. The two Linrad programs
seem to run fine, but other things seem slow/dead.
73
Leif
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Linrad" group.
To post to this group, send email to linrad@xxxxxxxxxxxxxxxx
To unsubscribe from this group, send email to linrad+unsubscribe@xxxxxxxxxxxxxxxx
For more options, visit this group at http://groups.google.com/group/linrad?hl=en
-~----------~----~----~----~------~----~------~--~---
LINRADDARNIL