What is the range of priorities offered by SCHED_TIMESHARE policy, and how is Java priority level mapped to them?
In the native-threaded JVM, we basically map the range (java.lang.Thread.MIN_PRIORITY-1..java.lang.Thread.MAX_PRIORITY) to the range determined by calling sched_get_priority_min() and sched_get_priority_max() for the SCHED_OTHER (also known as SCHED_TIMESHARE or SCHED_HPUX) policy. However, because non-privileged applications cannot raise the priority of threads, we only do this priority mapping for applications running as users with sufficient privileges to raise priorities or be a member of group PRIV_RTSCHED. For all other applications, the native-threaded JVM effectively ignores the Java thread priorities and all native threads are created with identical priorities.