Multithreading interview questions part 1

Multithreading interview questions part 1

Take as many assements as you can to improve your validate your skill rating

Total Questions: 20

1. _______ makes it possible for two or more activities to execute in parallel on a single processor.

Correct Answer is : Multithreading

2. In ______ an object of type Thread in the namespace System.Threading represents and controls one thread.

Correct Answer is : .NET

3. The method will be executed once the thread’s ______ method is called.

Correct Answer is : Start

4. Command to make thread sleep?

Correct Answer is : Thread.Sleep

5. An instance of class Buffer provides a threadsafe way of communication between ________

Correct Answer is : Objects

6. The model in which one kernel thread is mapped to many user-level threads is called :

Correct Answer is : Many to One model

7. The model in which one user-level thread is mapped to many kernel level threads is called :

Correct Answer is : One to Many model

8. In the Many to One model, if a thread makes a blocking system call :

Correct Answer is : the entire process will be blocked

9. In the Many to One model, multiple threads are unable to run in parallel on multiprocessors because :

Correct Answer is : only one thread can access the kernel at a time

10. The One to One model allows :

Correct Answer is : increased concurrency

11. What requires less resources?

Correct Answer is : Thread

12. What does not prevent JVM from terminating?

Correct Answer is : Daemon Thread

13. What decides thread priority?

Correct Answer is : Thread scheduler

14. What is true about time slicing?

Correct Answer is : Time slicing is the process to divide the available CPU time to available runnable thread

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

Correct Answer is : TRUE

16. What should not be done to avoid deadlock?

Correct Answer is : Execute foreign code while holding a lock

17. What is true about threading?

Correct Answer is : start() method creates new thread and calls code written in run() method

18. Which of the following is a correct constructor for thread?

Correct Answer is : Thread(Runnable a, String str)

19. Which of the following stops execution of a thread?

Correct Answer is : Calling notify() method on an object

20. Which of the following will ensure the thread will be in running state?

Correct Answer is : wait()

Similar Interview Questions

    Search for latest jobs

    Icon
    Icon