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


Please Help Members By Posting Answers For Below Questions

Can a class with private constructor be extended?

482


Write a java program to count the number of words present in a string?

531


how to know the total memory occupied by the objects in the ArrayList(Array list may contain duplicate objects)

1899


Difference difference paint() and paintcomponent()?

526


What is difference between adapter class and listener?

494






How many types of the indexof method are there for strings?

485


State the difference between strings and arrays.

595


What is a nested class?

587


What is files manifesting?

1720


What type of language is java?

538


How do you convert string to int in java?

553


What are benefits of java?

552


Why javac is not recognized?

515


What methodology can be utilized to link to a database?

502


Is simpledateformat safe to use in the multithreaded program?

537