with reference to Dan's Thread exam 1 Q17 t1.setPriority(Thread.MIN_PRIORITY); t2.setPriority(Thread.MAX_PRIORITY); 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?
posted 12 years ago
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="http://www.danchisholm.net/" target="_blank" rel="nofollow">Try my mock exam.</a>