2.1.5 - thinking concurrently Flashcards
10
1
Q
parallel processing
A
Requires multiple processors, each executing different instructions simultaneously, with the goal of speeding up computations.
2
Q
concurrent processing
A
Several processes are running, with each in turn being given a slice of processor time. Only one processor is necessary.
3
Q
reasons for concurrent processing
A
- The number of tasks completed in a given time is increased.
- Time that would be wasted by the processor waiting on the user is used on another task.
4
Q
disadvantages of concurrent processing
A
- safety: Possibility of corrupting the consistent state of a program.
- liveness: Tasks can suspend and wait on each other indefinitely, known as deadlock.
- resource consumption: Threads can consume resources in regards to scheduling, context-switching and synchronisation.
5
Q
advantages of concurrent processes
A
- reactive programming: Users are able to interact with applications while other tasks are running.
- availability of services: A long-running task won’t delay short-running ones.
- parallelism: A complex program can make use of multicore and/or multiprocessor systems.
- controllability: A task requiring preconditions to proceed can be suspended and easily resumed later.