AceTheInterview
Jobs in Pune | Work better in teams | Socialize with friends | Submit Q&A | Tell a friend
Search site for 

Top 100 Interview Questions & Answers in a convenient and easy to read book!

“I bought this guide a few days ago to prepare for my interview with Oracle. Many of the questions they asked me were from this guide. I found this book absolutely great!”

– Ravi, California

Read more comments...

Interview Questions And Answers RSS Feed

Answers »

  1. Submitted By: Amy — September 18, 2007
    not yet rated
      + -

    When a object invokes yield() it returns to a ready state. But when an object invokes sleep() it does not enter a ready state.

  2. Submitted By: vinay — October 13, 2007
    +1 votes
      + -

    When a thread calls yield function, it is telling the CPU specifically to allow another thread to access the resources. This means that the caller thread voluntarily is giving up resources instead of preemption by the processor’s scheduling algo.

    Incase of sleep(), the caller thread wants to go to sleep for a specific period of time, regardless of what the CPU does to it. This means that even though by virtue of scheduling algorithm, the time for changing a state has arrived for the thread, if it invoked sleep(), it wont wakeup untill the specific time period that it wanted to sleep has expired. The thread will start executing immediately after the time expires.

  3. Leave an Answer/Comment

    To prove you're a person (not a spam script), type the security text shown in the picture. Click here to regenerate some new text.
    Click to hear an audio file of the anti-spam word

Our Sponsors
Our Sponsors
Contact Us | FAQ | Sitemap | Terms of Use | Privacy Policy | Tell a Friend

Copyright © 1999-2006 Jeeve Technologies LLC. All rights reserved.