Concurrent Systems Flashcards

1
Q

What is concurrency?

A

Doing more than one thing at a time

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

What is concurrent computing?

A

When a program has more than one control flow

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

What is a system in software engineering context?

A

A large program or application

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

What is a distributed system?

A

System that executes over multiple physical hosts, each having different resources. Hosts must be networked together

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

Define intranet

A

Network internal to an organization

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

Define internet

A

Network external to all organizations (public network)

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

Why use a distributed system?

A

Users and hosts can be in different physical locations

A single host may have insufficient processing power

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

What is a multi-process system?

A

System made up of multiple processes, like different executables, or multiple copies of an executable

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

What does each process have in a multi-process system?

A

Independent control flow and virtual memory

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

Why use a multi-process system?

A

The system may have very different tasks to perform

These tasks may be completely independent from each other and use different resources

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

What is a multi-threaded system?

A

Where a process has multiple control flows, called threads

Each thread shares the same virtual memory, address space, and resources

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

Different threads may need to _________ with eachother

A

Synchronize

To communicate or exchange information

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

Possible issues with multi-threaded systems

A

Race conditions, deadlocks

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

Why use a multi-threaded system?

A

A process may have different tasks to perform, which may be somewhat dependent on each other

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

Issues in concurrency

A

Shared resources and deadlock

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

What is the problem with shared resources in concurrency?

A

Multiple processes or threads may need the same resource

Operations that make changes to resources must be atomic

17
Q

What does ‘atomic’ mean?

A

Atomic operations cannot be interrupted by the CPU

18
Q

What is deadlock

A

Happens when multiple threads are blocked, all waiting for a condition that will never occur

19
Q

What causes deadlocks?

A

Programming errors, improper handling of semaphores or mutexes

20
Q

What is a race condition?

A

Happens when the correctness of a program depends on one thread reaching a point in the control flow before another thread