EmSAT Achieve Exam  >  EmSAT Achieve Questions  >  Assume the following method is properly synch... Start Learning for Free
Assume the following method is properly synchronized and called from a thread A on an object B:
wait(2000);
After calling this method, when will the thread A become a candidate to get another turn at the CPU?
  • a)
    After thread A is notified, or after two seconds.
  • b)
    After the lock on B is released, or after two seconds.
  • c)
    Two seconds after thread A is notified.
  • d)
    Two seconds after lock B is released.
Correct answer is option 'A'. Can you explain this answer?
Most Upvoted Answer
Assume the following method is properly synchronized and called from a...
Option A. Either of the two events (notification or wait time expiration) will make the thread become a candidate for running again.
Option B is incorrect because a waiting thread will not return to runnable when the lock is released, unless a notification occurs.
Option C is incorrect because the thread will become a candidate immediately after notification, not two seconds afterwards.
Option D is also incorrect because a thread will not come out of a waiting pool just because a lock has been released.
Explore Courses for EmSAT Achieve exam

Top Courses for EmSAT Achieve

Question Description
Assume the following method is properly synchronized and called from a thread A on an object B:wait(2000);After calling this method, when will the thread A become a candidate to get another turn at the CPU?a)After thread A is notified, or after two seconds.b)After the lock on B is released, or after two seconds.c)Two seconds after thread A is notified.d)Two seconds after lock B is released.Correct answer is option 'A'. Can you explain this answer? for EmSAT Achieve 2025 is part of EmSAT Achieve preparation. The Question and answers have been prepared according to the EmSAT Achieve exam syllabus. Information about Assume the following method is properly synchronized and called from a thread A on an object B:wait(2000);After calling this method, when will the thread A become a candidate to get another turn at the CPU?a)After thread A is notified, or after two seconds.b)After the lock on B is released, or after two seconds.c)Two seconds after thread A is notified.d)Two seconds after lock B is released.Correct answer is option 'A'. Can you explain this answer? covers all topics & solutions for EmSAT Achieve 2025 Exam. Find important definitions, questions, meanings, examples, exercises and tests below for Assume the following method is properly synchronized and called from a thread A on an object B:wait(2000);After calling this method, when will the thread A become a candidate to get another turn at the CPU?a)After thread A is notified, or after two seconds.b)After the lock on B is released, or after two seconds.c)Two seconds after thread A is notified.d)Two seconds after lock B is released.Correct answer is option 'A'. Can you explain this answer?.
Solutions for Assume the following method is properly synchronized and called from a thread A on an object B:wait(2000);After calling this method, when will the thread A become a candidate to get another turn at the CPU?a)After thread A is notified, or after two seconds.b)After the lock on B is released, or after two seconds.c)Two seconds after thread A is notified.d)Two seconds after lock B is released.Correct answer is option 'A'. Can you explain this answer? in English & in Hindi are available as part of our courses for EmSAT Achieve. Download more important topics, notes, lectures and mock test series for EmSAT Achieve Exam by signing up for free.
Here you can find the meaning of Assume the following method is properly synchronized and called from a thread A on an object B:wait(2000);After calling this method, when will the thread A become a candidate to get another turn at the CPU?a)After thread A is notified, or after two seconds.b)After the lock on B is released, or after two seconds.c)Two seconds after thread A is notified.d)Two seconds after lock B is released.Correct answer is option 'A'. Can you explain this answer? defined & explained in the simplest way possible. Besides giving the explanation of Assume the following method is properly synchronized and called from a thread A on an object B:wait(2000);After calling this method, when will the thread A become a candidate to get another turn at the CPU?a)After thread A is notified, or after two seconds.b)After the lock on B is released, or after two seconds.c)Two seconds after thread A is notified.d)Two seconds after lock B is released.Correct answer is option 'A'. Can you explain this answer?, a detailed solution for Assume the following method is properly synchronized and called from a thread A on an object B:wait(2000);After calling this method, when will the thread A become a candidate to get another turn at the CPU?a)After thread A is notified, or after two seconds.b)After the lock on B is released, or after two seconds.c)Two seconds after thread A is notified.d)Two seconds after lock B is released.Correct answer is option 'A'. Can you explain this answer? has been provided alongside types of Assume the following method is properly synchronized and called from a thread A on an object B:wait(2000);After calling this method, when will the thread A become a candidate to get another turn at the CPU?a)After thread A is notified, or after two seconds.b)After the lock on B is released, or after two seconds.c)Two seconds after thread A is notified.d)Two seconds after lock B is released.Correct answer is option 'A'. Can you explain this answer? theory, EduRev gives you an ample number of questions to practice Assume the following method is properly synchronized and called from a thread A on an object B:wait(2000);After calling this method, when will the thread A become a candidate to get another turn at the CPU?a)After thread A is notified, or after two seconds.b)After the lock on B is released, or after two seconds.c)Two seconds after thread A is notified.d)Two seconds after lock B is released.Correct answer is option 'A'. Can you explain this answer? tests, examples and also practice EmSAT Achieve tests.
Explore Courses for EmSAT Achieve exam

Top Courses for EmSAT Achieve

Explore Courses
Signup for Free!
Signup to see your scores go up within 7 days! Learn & Practice with 1000+ FREE Notes, Videos & Tests.
10M+ students study on EduRev