What is synchronous execution?
Tasks execution goes one by one; the next task starts only if the previous one finished.
What is asynchronous execution?
Tasks can start at any time; they don’t have to wait until the previous one finished.
Select the correct statements
Which way is the best?
Select the correct statements
Which workflow blocks the execution until it’s finished
Synchronous
Which workflow occurs only for multiple tasks
Asynchronous
Which workflow is possible only if there are multiple executors
Parallel
What does the term “Critical section” mean?
a shared limited resource required for tasks execution
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?
64
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?
8
Select the correct statements
Select correct type for the task
A browser loads a page and shows an animated icon
Concurrent
Select correct type for the task
A video game catches mouse clicks and sends data to a server
Concurrent
Select correct type for the task
Two bakers create cakes
Parallel
What is concurrency?
an ability to execute different tasks simultaneously in overlapping periods and in no predefined order
What is parallelism?
an ability to process parts of one or several tasks simultaneously in parallel by different executors
What is synchronization?
a process of managing access to a scarce shared resource for concurrent tasks
Choose the terms that are related to each other, i.e. mean the same thing.
- Multitasking and concurrency
What does the term “thread” mean in computer science?
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
Where does the internal concurrency take place?
inside the same thread