Thinking Concurrently Flashcards

You may prefer our related Brainscape-certified flashcards:
1
Q

What is concurrent processing?

A

Concurrent processing involves executing multiple tasks simultaneously, where tasks overlap in execution but don’t necessarily run at the exact same time.

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

Why is concurrent processing useful?

A

It increases program efficiency, allows multiple tasks to progress without waiting for others to complete, and maximizes CPU usage.

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

What is parallel processing?

A

Parallel processing is when multiple processors or cores execute different parts of a task simultaneously, often used in high-performance computing.

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

What is a key difference between concurrent and parallel processing?

A

Concurrent processing shares resources and overlaps tasks, while parallel processing performs multiple tasks at the same time with separate processors or cores.

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

Give an example of a situation where concurrent processing is useful.

A

Handling multiple user requests on a web server or downloading files while continuing to browse a website.

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

What are the challenges of concurrent processing?

A

Common challenges include deadlock, race conditions, and ensuring tasks share resources without conflicts.

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

What is deadlock?

A

Deadlock occurs when two or more tasks are blocked forever, waiting on each other to release resources.

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

What is a race condition?

A

A race condition happens when two or more tasks try to access shared resources simultaneously, leading to unpredictable results.

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

How can concurrency issues like deadlock be prevented?

A

Deadlock can be avoided through proper task scheduling, locking mechanisms, and ensuring tasks don’t wait indefinitely for resources.

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

What is a context switch?

A

A context switch is when the CPU changes from executing one task to another in concurrent processing, saving the state of the old task and loading the state of the new one.

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