1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 <2021> 2022 2023 2024 2025 | Index | 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 <2021> 2022 2023 2024 2025 |
<== Date ==> | <== Thread ==> |
---|
Subject: | Re: Changing EPICS general Purpose Thread's Priorities |
From: | "Kim, Kukhee via Tech-talk" <tech-talk at aps.anl.gov> |
To: | "tech-talk at aps.anl.gov" <tech-talk at aps.anl.gov>, "jun-ichi.odagiri at kek.jp" <jun-ichi.odagiri at kek.jp> |
Date: | Fri, 26 Mar 2021 15:59:52 +0000 |
Dear Odagiri san,
Long time no see, I am glad to see your message 🙂
It
is possible to modify thread priority after the launching process, even possible to modify the scheduling policy (ex, SCHED_OTERH to SCHED_FIFO, to the real-time priority).
Please, check up the followings:
I am using linuxRT - preempted rt patch for this example.
We
can check up process id, parent id, thread id, rt-priority, start time, running time, and thread name with the following command.
The
3rd column is thread id, and the 4th column is a priority. The symbol "-" means no rt-priority for the thread, SCHED_OTHER.
The
thread "scan-10" has thread id 22230 and rt-priority 59.
The
thread "CAS-TCP" has thread id 22238 and rt-priority 16.
If we want to escalate the rt-priority for those threads, we can do the followings:
Then, you can see the priorities of those two threads were escalated.
I
think the help message of the "chrt" will be helpful.
chrt --help
Thank
you.
Best
regards,
Kukhee
From: Tech-talk <tech-talk-bounces at aps.anl.gov> on behalf of jun-ichi.odagiri--- via Tech-talk <tech-talk at aps.anl.gov>
Sent: Friday, March 26, 2021 12:09 AM To: tech-talk at aps.anl.gov <tech-talk at aps.anl.gov> Subject: Re: Changing EPICS general Purpose Thread's Priorities Dear Han san,
Thank you for sending me the information. I took a look at the site you have let me know. But, I may be dense, I could not get the point. It seems like that the information on the site is related to Multi-Core Linux. To be more concrete, I tell you what I have in my mind as follows. 1. A Single-Core CPU is running Linux. 2. Only one IOC program is running on the Linux. 3. The IOC program is multi-threaded, as every one knows. Here is my question. Can I change the priority of "CAS-TCP" thread and "scan-10" thread so that the former is given a higher priority than that of the latter without modifying any source files in base? Does the site you guided me to answer the question? Thanks a lot again in advance. Best regards, J.Odagiri at KEK. ----- Original Message ----- > Jun-ichi Odagiri san, > > This may be what you are looking for. > > https://github.com/epics-modules/MCoreUtils > > Best, > Han > > > On Thu, Mar 25, 2021 at 4:55 PM jun-ichi.odagiri--- via Tech-talk > <tech-talk at aps.anl.gov> wrote: > > > > Hi, all > > > > Do we have a way to change the priorities of the EPICS > > general purpose threads dynamically on the iocsh? > > > > Thanks a lot in advance. > > > > Jun-ichi Odagiri(KEK) > > > > > > > |