in Education by
What will happen if two thread of the same priority are called to be processed simultaneously? (a) Anyone will be executed first lexographically (b) Both of them will be executed simultaneously (c) None of them will be executed (d) It is dependent on the operating system I have been asked this question in exam. This interesting question is from Multithreading Basics in section Multithreading of Java Select the correct answer from above options JavaScript questions and answers, JavaScript questions pdf, JavaScript question bank, JavaScript questions and answers pdf, mcq on JavaScript pdf, JavaScript questions and solutions, JavaScript mcq Test , Interview JavaScript questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)

1 Answer

0 votes
by
The correct answer is (d) It is dependent on the operating system The explanation: In cases where two or more thread with same priority are competing for CPU cycles, different operating system handle this situation differently. Some execute them in time sliced manner some depending on the thread they call.

Related questions

0 votes
0 votes
    Which of these method is used to explicitly set the priority of a thread? (a) set() (b) make() ... , JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Oct 24, 2021 in Education by JackTerrance
0 votes
    Thread priority in Java is? (a) Integer (b) Float (c) double (d) long The question was asked in ... , JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Oct 24, 2021 in Education by JackTerrance
0 votes
    What decides thread priority? (a) Process (b) Process scheduler (c) Thread (d) Thread scheduler The ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Oct 24, 2021 in Education by JackTerrance
0 votes
0 votes
    What will happen if we call setTimeout() with a time of 0 ms? (a) Placed in stack (b) Placed ... , JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Oct 23, 2021 in Education by JackTerrance
0 votes
    What will happen if the first argument of open() is omitted? (a) Error Page (b) Remains in the ... , JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Oct 23, 2021 in Education by JackTerrance
0 votes
    What will happen if the browser encounters a script tag without an src attribute? (a) Throws an error ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Oct 23, 2021 in Education by JackTerrance
0 votes
0 votes
    What will happen if you set the private flag as 1? (a) Test will be run only by the ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Oct 22, 2021 in Education by JackTerrance
0 votes
    What will happen if the fvonly parameter is set to 1? (a) Results got for the first view (b) ... , JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Oct 22, 2021 in Education by JackTerrance
0 votes
    What will happen if you specify an absolute URL in the Worker constructor? (a) Resolves itself (b) ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Oct 22, 2021 in Education by JackTerrance
...