I am trying to get a better understanding so I can scope the reliability impact from potential interoperability issues when creating an android app/service. I would like to
Android in this regard is a little different than a normal Linux system. There are two things Android uses to impact scheduling: process/thread "nice" level and cgroups.
The process "nice" level impacts the normal "fair" scheduling policy of Linux; threads that have a higher niceness will be run less often than threads with a lower niceness. In the situation where you have one thread at a "default" priority (as defined in Process.THREAD_PRIORITY_DEFAULT) will get to run significantly more often than those at a background priority (or Process.THREAD_PRIORITY_BACKGROUND).
In theory this can make sure that the foreground/UI threads aren't impacted significantly by background work... however, in practice, it isn't sufficient. Consider if you have 10 background threads all wanting to run, but one foreground thread driving the UI. This can still result in noticeable impact on the behavior of the foreground thread.
To address this, Android also uses Linux cgroups in a simple way to create more strict foreground vs. background scheduling. The foreground/default cgroup allows thread scheduling as normal. The background cgroup however applies a limit of only some small percent of the total CPU time being available to all threads in that cgroup. Thus if that percentage is 5% and you have 10 background threads all wanting to run and one foreground thread, the 10 background threads together can only take at most 5% of the available CPU cycles from the foreground. (Of course if no foreground thread wants to run, the background threads can use all of the available CPU cycles.)
Android implicitly moves threads between the default and background cgroups when you use its public APIs to set the thread priority. Thus if you set a thread's priority to Process.THREAD_PRIORITY_BACKGROUND or greater, you will also be putting the thread into the background cgroup. Set it to Process.THREAD_PRIORITY_DEFAULT and it will be in the default cgroup.
Because of this, by following the normal convention of putting your background worker threads into the background priority you can ensure that they do not disrupt your foreground UI thread.
In addition, Android will also move all threads in a process to the background cgroup for processes that it knows are not critical to the user. Any background process or service process has its threads put into the background cgroup, regardless of whether individual threads have requested a foreground scheduling priority.