0

this is two questions: list the order of the threads. i am not sure of the answer but i have included my thinking, thanks.

Thread State Priority
threadA Runnable 5
threadB Sleeping 5
threadC Sleeping 5
threadD Waiting 5
threadE Runnable 5
ANSWER: A,E,D,B,C

Thread State Priority
threadA Runnable 5
threadB Sleeping 6
threadC Sleeping 5
threadD Waiting 4
threadE Runnable 4
ANSWER: B,A,C,E,D

My thinking was start from top to bottom choose the highest priority no matter the state, then once on the same level of priority from top down select runnable first, then wait then sleeping.
thanks

2
Contributors
3
Replies
4
Views
8 Years
Discussion Span
Last Post by __avd
0

okay, but are you saying Priority and states have no impact on how the jvm will run the threads? perhaps that is my question.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.