2.1.4 - Thinking concurrently Flashcards

1
Q

concurrency

A

means an application is making progress on more than on task at the same time

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

thinking concurrently

A

is a skill which involves working out which parts of a program need to be developed so that they can be processed at the same time and which parts are dependent on each other

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

parallel processing

A

when multiple processors are used to complete more than one task simultaneously

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

parallelism

A

means an application splits its task into smaller subtasks which can be processed in parallel

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

Difference between concurrency and parallelism

A
  • a system is said to be concurrent if it can support two or more actions in progress at the same time
  • a system is said to be parallel if it can support two or more actions executing simultaneously
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Concurrency is about…

A

dealing with lots of things at once

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

Parallelism is about…

A

doing lots of things at once

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

benefits of concurrent processing

A

reactivity
- users are able to interact with applications while other tasks are running
availability of services:
- a long running task won’t delay a short running one
parallelism:
- a complex program can make use of multi-core/ multi-processor systems
controllability:
- a task that requires preconditions to proceed can be suspended and easily resumed later on

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

reasons for concurrent processing

A
  • the number of tasks completed in a given time is increased
  • the time that would be wasted by the processor waiting on a user or another process is reduced
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

drawbacks of concurrent processing

A

safety
- possibility of corrupting the consistent state of a program
liveness:
- tasks can suspend and wait for each other indefinitely, known as deadlock
resource consumption:
- threads can consume resources in regards to scheduling, context-switching and synchronisation

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

thread

A

are entities within a process that can run concurrently in shared memory spaces

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