What is the purpose of using the yield method of thread class?



What is the purpose of using the yield method of thread class?..

Answer / Piyush Dixit

The 'yield' method in Java Thread class is used for cooperative multitasking, allowing other threads to execute when a thread voluntarily relinquishes control. It helps prevent CPU-bound threads from consuming all available CPU cycles and improves responsiveness by giving other threads a chance to run.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Operating Systems General Concepts Interview Questions

What level of security does Windows NT meets?

2 Answers   TCS,


A pair of redundant systems are operating, how would you ensure that when one of them goes down, the other one will take over its operation?

1 Answers   DELL,


What is DRAM? In which form does it store data?

1 Answers  


What is the most used operating system?

1 Answers  


How long does chkdsk take to run?

1 Answers  


How do I find the location of an excel file?

1 Answers  


How do I know if my os is corrupted?

1 Answers  


What is busy waiting?

3 Answers  


Define scheduling in OS.

1 Answers   Agilent,


What is the difference between mailbox and queue?

1 Answers  


Can anybody send me Excel tips and improtant formul...... please.

0 Answers   Accenture,


How do I find a file path on a mac?

1 Answers  


Categories