In this section, you'll learn how to query the scheduling policy and priority of any given thread on the system. (But what about programmatically querying and setting the same? We defer that discussion to the following chapter, in the Querying and setting a thread’s scheduling policy and priority section.)
We learned that, on Linux, the thread is the KSE; it's what actually gets scheduled and runs on the processor. Also, Linux has several choices for the scheduling policy (or algorithm) to use. The policy, as well as the priority to allocate to a given task (process or thread), is assigned on a per-thread basis, with the default always being the SCHED_OTHER policy with real-time priority 0.
On a given Linux system, we can always see all processes alive (via a simple ps -A), or, with GNU ps, even every thread alive (ps -LA). This does not tell us, though, what scheduling policy and priority these...