Menu

#8 raise process priority for acquisition

open
daq (12)
5
2003-01-28
2003-01-28
No

It would be useful for daq to run setuid root so it
could raise its process priority when acquiring data.
Data loss doesn't appear to be a problem, but the INNER
loop can be choppy if there's contention for the CPU.

Discussion

  • Steven Jenkins

    Steven Jenkins - 2003-02-12

    Logged In: YES
    user_id=124984

    It's not as simple as raising priority. The internal
    architecture of daq traces back to MS-DOS, which provided
    little in the way of support for asynchrony. Daq busy-waits
    for events, which makes it CPU-bound. Raising its priority
    will starve all other applications on the machine. The main
    loop in daq needs to be converted to use pthreads so it will
    yield the CPU when not busy.

     
  • Steven Jenkins

    Steven Jenkins - 2004-06-28

    Logged In: YES
    user_id=124984

    Setting the comedi file descriptor back to blocking may
    alleviate the starvation problem.

     
  • Steven Jenkins

    Steven Jenkins - 2004-07-09

    Logged In: YES
    user_id=124984

    Leaving the comedi file descriptor in the default (blocking)
    mode eliminates busy-waiting without (apparently) causing
    other problems. This change (not including raising the
    process priority) is in 3.11.4.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.