The idea of making sure a program can do multiple processes at one time.
- Parallel processing - literal parallel, things actually happening at the same time.
- Multiple processors/cores running at the same time.
- Concurrent processing - the illusion of parallel processing.
- One processor, the illusion of concurrency.
- Thinking Concurrently.
Pipelining
Example-based
No Pipelining
| Fetch | Decode | Execute |
|---|---|---|
| A | idle | idle |
| idle | A | idle |
| idle | idle | A |
idle = time wasted
Pipelining
| Fetch | Decode | Execute |
|---|---|---|
| B | A | idle |
| C | B | A |
| D | C | B |
idle = time wasted
Pipelining is more efficient as it’s doing more jobs concurrently, making up more optimal usage of time. Flushing is when you get rid of everything - stopping the pipeline, i.e., if A halts. It is not ideal. For example, this may occur at branching - clearing pre-loaded instructions. Example: If A needs a process and can’t execute without, then every process in the pipeline must be flushed to make way for that process, so time wasted.
Info
Go over example.
%%in order to make way for the new process%%