Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


1) There are 10 different threads in runnable state. Each
having priority 1 to 10. How does the CPU schedules or
executes these threads?

Answers were Sorted based on User's Feedback



1) There are 10 different threads in runnable state. Each having priority 1 to 10. How does the CP..

Answer / karthik

We are not sure about when a thread runs it depends upon the
thread scheduler which can able to run a thread at any time
so the priorities are not sure even if we use the
setpriority method for a thread : ref scjp book thread chapter

Is This Answer Correct ?    10 Yes 3 No

1) There are 10 different threads in runnable state. Each having priority 1 to 10. How does the CP..

Answer / 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

More Core Java Interview Questions

Is null a string in java?

0 Answers  


What is Hierarchy of exception?

0 Answers   Amdocs,


When throw keyword is used?

0 Answers  


Which browsers work with java?

0 Answers  


What is java class writing rules?

1 Answers   Oracle,


What is java in layman terms?

0 Answers  


What are Advatages of Overloading and Overridding.

8 Answers   TCS, Wipro,


What is output buffer?

0 Answers  


What do you mean by object?

0 Answers  


What do you mean by an object in java?

0 Answers  


Integer.parse Int(bf.readLine(System.out.println("enter value for n["+m+"]:"))); can it run under this

1 Answers  


Why does the integer quotient -0/3 yield 0, but the double quotient -0.0/3.0 yields – 0.0?

0 Answers  


Categories