Essentials Flashcards

1
Q

What is synchronous execution?

A

Tasks execution goes one by one; the next task starts only if the previous one finished.

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

What is asynchronous execution?

A

Tasks can start at any time; they don’t have to wait until the previous one finished.

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

Select the correct statements

  1. Asynchronous processing is possible only if there are several tasks.
  2. Parallel execution is impossible if there is only one task.
  3. Parallel processing is possible only if there are several executors.
  4. Asynchronous execution is only for one executor; it’s impossible for several.
A
  1. Asynchronous processing is possible only if there are several tasks.
  2. Parallel processing is possible only if there are several executors.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Which way is the best?

  • Tell the story
  • Iron your shirt and wash your clothes
  • Deliver 10 packages with 10 couriers
A
  • Tell the story - Synchronous
  • Iron your shirt and wash your clothes - Asynchronous
  • Deliver 10 packages with 10 couriers - Parallel
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Select the correct statements

  • Asynchronous tasks can’t run one by one; they must overlap each other in time.
  • Synchronous tasks are outdated and are rarely used nowadays.
  • A synchronous task blocks the whole process till the task is completed
  • Asynchronous tasks execution process can come in parallel
A
  • A synchronous task blocks the whole process till the task is completed
  • Asynchronous tasks execution process can come in parallel
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Which workflow blocks the execution until it’s finished

A

Synchronous

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

Which workflow occurs only for multiple tasks

A

Asynchronous

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

Which workflow is possible only if there are multiple executors

A

Parallel

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

What does the term “Critical section” mean?

A

a shared limited resource required for tasks execution

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

Parallelism in everyday life

A gardener can plant four rose bushes per hour. How many rose bushes can eight gardeners plant in two hours if each gardener has a shovel?

A

64

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

Concurrency in everyday life

A gardener can plant four rose bushes per hour. How many rose bushes eight gardeners could plant in two hours if they have to use one shovel in turn?

A

8

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

Select the correct statements

  • Concurrency is possible only if there are several executors
  • Tasks can be parallel and concurrent at the same time
  • Concurrency appears only if there is a scarce shared resource
  • Parallel tasks can become concurrent in some circumstances.
A
  • Tasks can be parallel and concurrent at the same time
  • Concurrency appears only if there is a scarce shared resource
  • Parallel tasks can become concurrent in some circumstances.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Select correct type for the task

A browser loads a page and shows an animated icon

A

Concurrent

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

Select correct type for the task

A video game catches mouse clicks and sends data to a server

A

Concurrent

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

Select correct type for the task

Two bakers create cakes

A

Parallel

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

What is concurrency?

A

an ability to execute different tasks simultaneously in overlapping periods and in no predefined order

17
Q

What is parallelism?

A

an ability to process parts of one or several tasks simultaneously in parallel by different executors

18
Q

What is synchronization?

A

a process of managing access to a scarce shared resource for concurrent tasks

19
Q

Choose the terms that are related to each other, i.e. mean the same thing.

  • Multiprocessing and concurrency
  • Multitasking and parallelism
  • Multiprocessing and parallelism
  • Parallelism and concurrency
  • Multitasking and concurrency
A
  • Multiprocessing and parallelism

- Multitasking and concurrency

20
Q

What does the term “thread” mean in computer science?

A

Thread is the unit of activity inside a process, and represents series of executable instructions.

(Alternative)
a stream of instructions inside a process that can be scheduled and run independently

21
Q

Where does the internal concurrency take place?

A

inside the same thread