Mcq - Threads In Java

21. What is multithreaded programming?

A. It’s a process in which two different processes run simultaneously
B. It’s a process in which two or more parts of same process run simultaneously
C. It’s a process in which many different process are able to access same information
D. It’s a process in which a single process can access information from many sources

View Answer


22.Which of these are types of multitasking?

A. Process based
B. Thread based
C. Process and Thread based
D. None of the mentioned

View Answer


23. Thread priority in Java is?

A. Integer
B. Float
C. double
D. long

View Answer


24. 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

View Answer


25. Which of these statements is incorrect?

A. By multithreading CPU idle time is minimized, and we can take maximum use of it
B. By multitasking CPU idle time is minimized, and we can take maximum use of it
C. Two thread in Java can have the same priority
D. A thread can exist only in two states, running and blocked

View Answer


26. What requires less resources?

A. Thread
B. Process
C. Thread and Process
D. Neither Thread nor Process

View Answer


27. v What does not prevent JVM from terminating?

A. Process
B. Daemon Thread
C. User Thread
D. JVM Thread

View Answer


28. What decides thread priority?

A. Process
B. Process scheduler
C. Thread
D. Thread scheduler
.

View Answer


29. What is true about time slicing?

A. Time slicing is OS service that allocates CPU time to available runnable thread
B. Time slicing is the process to divide the available CPU time to available runnable thread
C. Time slicing depends on its implementation in OS
D. Time slicing allocates more resources to thread

View Answer


30. Deadlock is a situation when thread is waiting for other thread to release acquired object.

A. True
B. False

View Answer







Also check :


Discussion


* You must be logged in to add comment.