0

I've currently inherited some legacy code in which the user program spawns two threads running at priority level 49.

Here's a snippet for one of the threads:

SchedParam.sched_priority = 49;
if(retval=pthread_setschedparam(pthread_self(), SCHED_RR, &SchedParam))
    SysError("'pthread_setschedparam()' for thread X failed");

I've been making some modifications to this legacy code and have noticed some occasional odd behavior where the dev-server will just "lock up". Essentially I can't login into the server and I can't even ping the device.

Assuming I've introduced a bug where the user program hangs, I'm curious if the sched_priority = 49 could be the cause. I've come to the realization that I don't how this priority compares to other linux system processes (such as the process that responds to pings).

I realize that there could be a variety of other things going wrong (i.e. kernel crashing) and I am by no means asking what priority I should be using for this thread, however, I'm curious if there is a method for determining the priority of linux system processes.

Is it possible that my priority 49 is larger than most other system processes?

  • There is no process that responds to pings -- the kernel does that. Setting this priority should not make your system unresponsive. – Andy Dalton Oct 4 '18 at 19:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.