1) There are 10 different threads in runnable state. Each
having priority 1 to 10. How does the CPU schedules or
executes these threads?
Answer Posted / shiv
At any given time the highest priority thread will always
be in a execution state. if there are more than one threads
with same priority then JVM decides which one should be
executed first. Thus if the priority is from 1..10 the they
will be scheduled for execution in a reverse manner.
| Is This Answer Correct ? | 10 Yes | 4 No |
Post New Answer View All Answers
When should we create our own custom exception classes?
What advantage do java's layout managers provide over traditional windowing systems?
What is an anonymous class in java?
Differences between external iteration and internal iteration?
What is multithreading and its advantages?
What is the purpose of interface?
What is return keyword in java?
What are the access modifiers in java?
Difference between class#getinstance() and new operator ?
what is meant by Garbage collection?
What is the flag in java?
How can we make string upper case or lower case?
What's the default access specifier for variables and methods of a class?
Difference between object instantiation and construction ?
What is an immutable object? How do you create one in java?