Java Concurrency Flashcards

(4 cards)

1
Q

Why multithreading?

A
  1. better CPU utilization
  2. makes application responsive
  3. fairness for all the users
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q
A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly