It's not a secret anymore!
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes thread priority Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "thread priority" Watch "thread priority" New topic

thread priority

Yi Meng
Ranch Hand

Joined: May 07, 2003
Posts: 270
with reference to Dan's Thread exam 1 Q17
The answer given is "a.The priority assigned to thread T2 is greater than the priority assigned to T1.".
But to some single priority operating system all the threads will actually be the same priority.....and thus the answer should be "d. None of the above.". is it true? any comments?

Meng Yi
Dan Chisholm
Ranch Hand

Joined: Jul 02, 2002
Posts: 1865
The complete question is as follows.

Answer a.
The explanation is as follows.

The Java Language Specification suggests that higher priority threads should be given preference over lower priority threads but explicitly states that such preference is not a guarantee. It is very important to remember that no guarantee exists.

It is correct to say that the operating system is free to ignore the priority levels assigned to the Threads.

Dan Chisholm<br />SCJP 1.4<br /> <br /><a href="" target="_blank" rel="nofollow">Try my mock exam.</a>
I agree. Here's the link:
subject: thread priority
It's not a secret anymore!