Wk1L1 - Intro Flashcards

1
Q

What is the difference between concurrency and parallelism?

A

Concurrency is the ability to run multiple tasks independently, possibly on the same CPU core.

Parallelism is the ability to execute multiple tasks simultaneously, requiring multiple threads or processors.

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

What is a thread?

A

A thread is an independent path of execution within a process. In parallel computing, a process can have multiple threads running simultaneously.

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

What analogy is used to explain sequential vs. parallel execution?

A

Sequential: A single chef cooking a meal one task at a time.

Parallel: Multiple chefs working together on different tasks to finish the meal faster.

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

Why is parallelism important in modern processors?

A

Modern processors are multi-CPU or GPU-based, which are inherently parallel. Using parallelism helps to exploit these systems for better performance and efficiency.

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

What is the benefit of concurrency in distributed applications?

A

Concurrency allows geographically separated individuals to collaborate in real-time via decentralized peer-to-peer software, such as in Bitcoin or file torrents.

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

What is the significance of resource utilization in concurrency?

A

Concurrency allows one thread to run while another waits for an external resource (e.g., user input or data from a disk), ensuring that the CPU continues to be utilized effectively.

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

What challenges arise when writing parallel programs?

A
  • Parallel programs are harder to debug.
  • Context switching and increased resource consumption add overhead.
  • Not all problems decompose easily into parallel tasks.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What are some examples of industrial applications of parallel computing?

A
  • Artificial intelligence
  • Stress testing
  • Oil exploration
  • Pharmaceutical design
  • Advanced CGI for movies
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is Moore’s Law, and how does it relate to parallel processing?

A

Moore’s Law predicts that the number of components on an integrated circuit doubles every two years. As the trend of more transistors continues, modern CPUs feature multiple cores, making parallelism essential for utilizing this growth.

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

What are the drawbacks of parallel computing?

A
  • Complex design
  • Harder debugging
  • Increased resource consumption (memory, call stacks)
  • Some problems don’t easily parallelize
  • Sometimes, a better sequential algorithm outperforms a parallel solution for small problem sizes.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly