Parallel processing
<aside>
💡 With the existence of multicore processors, we need software that is able to utilise this power
</aside>
- More than one processing unit works on a single task, sharing the load of the processing power required
- To do this, the single task is split into smaller 'chunks' called threads, and these are assigned to each individual processing unit, which execute the thread immediately
- Both units need to communicate with each other to ensure that they always have the most up-to-date piece of data to work with
- Calculations are carried simultaneously
- Operates on the principle that large problems can often be divided into smaller ones, which are then solved concurrently
✅ Advantages
- Faster execution, as more instructions run in a shorter time span
- Each task is equally shared, so no processing unit will be more loaded than the others
❌ Disadvantages
- Much more difficult to write programs that take advantage of a multi-core system
- Data must be up-to-date, and processing units will need to change their calculations based on the actions of other processing units
- Cannot split sequential tasks
- Concurrency (multiple computations happening at the same time) means more software bugs to deal with
- Communication and synchronisation between the different subtasks are typically some of the greatest obstacles to getting efficient parallel program performance
Cache