0% found this document useful (0 votes)
5 views1 page

Multithreading Questions

This document presents a list of 29 key questions related to multithreading and concurrency, covering fundamental concepts such as the differences between processes and threads, thread lifecycle, synchronization, and thread management techniques. It also addresses advanced topics like deadlocks, race conditions, and the use of ExecutorService and thread pools. The questions serve as a guide for understanding and handling concurrency in programming applications.

Uploaded by

gandhiad1
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views1 page

Multithreading Questions

This document presents a list of 29 key questions related to multithreading and concurrency, covering fundamental concepts such as the differences between processes and threads, thread lifecycle, synchronization, and thread management techniques. It also addresses advanced topics like deadlocks, race conditions, and the use of ExecutorService and thread pools. The questions serve as a guide for understanding and handling concurrency in programming applications.

Uploaded by

gandhiad1
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Multithreading & Concurrency - Top 29 Questions

1. What is multithreading and why is it used?

2. Difference between process and thread

3. Difference between Thread and Runnable

4. What is the thread lifecycle in Java?

5. What is context switching?

6. What is a daemon thread?

7. What is thread priority? Does it guarantee execution?

8. What is synchronization and why is it needed?

9. Difference between synchronized method and synchronized block

10. What is an intrinsic lock (monitor)?

11. What is a deadlock? How can you prevent it?

12. What is a race condition?

13. What is thread starvation?

14. What is livelock?

15. What are wait(), notify(), and notifyAll()?

16. Difference between wait() and sleep()

17. Why must wait() be called inside a synchronized block?

18. What happens if notify() is called before wait()?

19. What is ExecutorService? Why is it preferred over Thread?

20. What is a thread pool? Types of thread pools

21. Difference between submit() and execute()

22. What is Future?

23. What is CompletableFuture?

24. Difference between synchronous and asynchronous execution

25. What is the volatile keyword?

26. Difference between volatile and synchronized

27. What is the happens-before relationship?

28. What are atomicity, visibility, and consistency?

29. How do you handle concurrency in your application?

You might also like