Java Concurrency Flashcards
(4 cards)
1
Q
Why multithreading?
A
- better CPU utilization
- makes application responsive
- fairness for all the users
2
Q
Multithreading vs. Multitasking
A
Multitasking: concurrent execution of multiple process by CPU
Multithreading: concurrent execution of multiple threads of a process by CPU
3
Q
challenges of Multithreading?
A
Different Threads works on shared Heap memory. So accessing and updating same memory can lead to race conditions and data update inconsitencies if not handled correctly.
4
Q
A