Results 1 to 5 of 5
Thread: priority
- 01-13-2010, 08:14 PM #1
Member
- Join Date
- Jan 2010
- Posts
- 25
- Rep Power
- 0
priority
Thread API priority translation to OS thread priority ! - Stack Overflow
Solaris
* 1 ⇒ 0
* 2 ⇒ 32
* 3 ⇒ 64
* 4 ⇒ 96
* 5 – 10 ⇒ 127
Of note is that on Solaris, you can't raise the thread priority above normal, only lower it: the priority value for 5 is the same as any of the higher values.
Linux
* 1 – 10 ⇒ 4 – -5 (nice values)
Of note is that on Linux, different thread priorities in Java do map to distinct priority values at native level.
Windows
* 1 – 2 ⇒ THREAD_PRIORITY_LOWEST
* 3 – 4 ⇒ THREAD_PRIORITY_BELOW_NORMAL
* 5 – 6 ⇒ THREAD_PRIORITY_NORMAL
* 7 – 8 ⇒ THREAD_PRIORITY_ABOVE_NORMAL
In linux , Is it overhead windows? I mean 10 is the highest priority in windows , But in linux , is it the lowest priority?
Another question:
What is Java 'thread priority'?
In this site there is a table that shows priorities in windows
Is this table is similar for all windows versions?
Dose anyone knows priority for different version of windows?(VISTA .7. XP and..)
- 01-14-2010, 01:34 AM #2
Java's virtual machine sits on top of the OS and uses OS resources, such as threads. Since Java is OS independent, Java has to map some of its settings to OS settings in the VM. In the case of thread priority, each OS handles thread priority quite differently. The documentation you quoted shows some of the mappings.
I don't know for sure, but I suspect that the different versions of Windows define thread priorities the same way.
- 01-14-2010, 12:37 PM #3
Member
- Join Date
- Jan 2010
- Posts
- 25
- Rep Power
- 0
I don't know for sure, but I suspect that the different versions of Windows define thread priorities the same way.
The columns are actual priority levels, only 22 of which must be shared by all applications. (The others are used by NT itself.) The rows are priority classes. The threads running in a process pegged at the idle priority class are running at levels 1 through 6 and 15, depending on their assigned logical priority level.
For example, Windows 2000 has 7 priority levels that are not fixed, so the mapping is indeterminate
- 01-25-2010, 01:46 PM #4
Senior Member
- Join Date
- Nov 2008
- Posts
- 286
- Rep Power
- 13
In case it's of any use, I put together some information a while back on how Java thread priorities map to OS thread priorities under Windows and Linux. (In Linux, they actually map specifically to nice values.)
It's worth noting that (a) the mapping changed subtly between Java 5 and Java 6; and (b) thread "priority" really means slightly different things in Windows vs Linux.Neil Coffey
Javamex - Java tutorials and performance info
- 01-07-2012, 12:49 AM #5
Member
- Join Date
- Jan 2012
- Posts
- 1
- Rep Power
- 0
Ugg Boots Cheap
drOJHiNB, Cheap Ugg Boots ,WRYfBXbS, <a href=http://cheap-ugg-boots-onlines.com>Ugg Boots For Cheap</a> ,xQgvPLeE, Cheap Ugg Boots, Ugg Boots For Cheap USA, Free Shipping! Ugg Boots For Cheap , tSwnLrPH
Similar Threads
-
how high-priority thread allow other thread
By rameshkr in forum Threads and SynchronizationReplies: 4Last Post: 10-15-2009, 10:46 PM -
Priority Queue Question
By Taz_84 in forum New To JavaReplies: 0Last Post: 01-29-2009, 03:23 AM -
How to implement Priority queue with Java
By Java Tip in forum java.langReplies: 0Last Post: 04-12-2008, 08:49 PM -
How to get/set thread priority
By Java Tip in forum java.langReplies: 0Last Post: 04-09-2008, 06:40 PM -
what is the Priority for execution of Interface class and a Abstract class
By Santoshbk in forum Advanced JavaReplies: 0Last Post: 04-02-2008, 07:04 AM
Bookmarks