JOBSEEKERS
Login
Sign Up
Jobseeker
Employer
Staffing Firm
Direct Client
Multithreading interview questions part 1
Multithreading interview questions part 1
Back
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.
A. Multithreading
B. Threading
C. SingleThreading
D. Both Multithreading and SingleThreading
Show Correct Answer
Correct Answer is :
Multithreading
2. In ______ an object of type Thread in the namespace System.Threading represents and controls one thread.
A. . PY
B. .SAP
C. .NET
D. .EXE
Show Correct Answer
Correct Answer is :
.NET
3. The method will be executed once the thread’s ______ method is called.
A. EventBegin
B. EventStart
C. Begin
D. Start
Show Correct Answer
Correct Answer is :
Start
4. Command to make thread sleep?
A. Thread.Sleep
B. Thread_Sleep
C. ThreadSleep
D. Thread_sleep
Show Correct Answer
Correct Answer is :
Thread.Sleep
5. An instance of class Buffer provides a threadsafe way of communication between ________
A. Actors
B. Objects
C. Locking
D. Buffer
Show Correct Answer
Correct Answer is :
Objects
6. The model in which one kernel thread is mapped to many user-level threads is called :
A. Many to One model
B. One to Many model
C. Many to Many model
D. One to One model
Show Correct Answer
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 :
A. Many to One model
B. One to Many model
C. Many to Many model
D. One to One model
Show Correct Answer
Correct Answer is :
One to Many model
8. In the Many to One model, if a thread makes a blocking system call :
A. the entire process will be blocked
B. a part of the process will stay blocked, with the rest running
C. the entire process will run
D. none of the mentioned
Show Correct Answer
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 :
A. only one thread can access the kernel at a time
B. many user threads have access to just one kernel thread
C. there is only one kernel thread
D. none of the mentioned
Show Correct Answer
Correct Answer is :
only one thread can access the kernel at a time
10. The One to One model allows :
A. increased concurrency
B. decreased concurrency
C. increased or decreased concurrency
D. concurrency equivalent to other models
Show Correct Answer
Correct Answer is :
increased concurrency
11. What requires less resources?
A. Thread
B. Process
C. Thread and Process
D. Neither Thread nor Process
Show Correct Answer
Correct Answer is :
Thread
12. What does not prevent JVM from terminating?
A. Process
B. Daemon Thread
C. User Thread
D. JVM Thread
Show Correct Answer
Correct Answer is :
Daemon Thread
13. What decides thread priority?
A. Process
B. Process scheduler
C. Thread
D. Thread scheduler
Show Correct Answer
Correct Answer is :
Thread scheduler
14. 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
Show Correct Answer
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.
A. TRUE
B. FALSE
C.
D.
Show Correct Answer
Correct Answer is :
TRUE
16. What should not be done to avoid deadlock?
A. Avoid using multiple threads
B. Avoid hold several locks at once
C. Execute foreign code while holding a lock
D. Use interruptible locks
Show Correct Answer
Correct Answer is :
Execute foreign code while holding a lock
17. What is true about threading?
A. run() method calls start() method and runs the code
B. run() method creates new thread
C. run() method can be called directly without start() method being called
D. start() method creates new thread and calls code written in run() method
Show Correct Answer
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?
A. Thread(Runnable a, String str)
B. Thread(int priority)
C. Thread(Runnable a, int priority)
D. Thread(Runnable a, ThreadGroup t)
Show Correct Answer
Correct Answer is :
Thread(Runnable a, String str)
19. Which of the following stops execution of a thread?
A. Calling SetPriority() method on a Thread object
B. Calling notify() method on an object
C. Calling wait() method on an object
D. Calling read() method on an InputStream object
Show Correct Answer
Correct Answer is :
Calling notify() method on an object
20. Which of the following will ensure the thread will be in running state?
A. yield()
B. notify()
C. wait()
D. Thread.killThread()
Show Correct Answer
Correct Answer is :
wait()
Similar Interview Questions
Search for latest jobs
Find Jobs