2.1 Computational Thinking Flashcards
Describe Abstraction
The process of separating ideas from reality: hiding irrelevant detail and showing relevant detail
What is the need for abstraction?
Abstraction means it is easier and less confusing to model and display situations.
The removal of detail to highlight only relevant parts helps with understanding.
What are some examples of devising an abstract model?
Colour coding
Use of icons/graphics
Labels
Key/legend
What is the benefit of thinking ahead?
This allows you to maximise the efficiency of code and programs, and minimise mistakes and errors.
What are the 4 common shapes of a flow diagram?
Oval: Start / Stop
Rectangle: process
Diamond: decision
Parallelogram: Input / Output
How do pre-conditions effect a solution?
The conditions that already exist which could affect a problem’s solution will need to be determined before starting to find out the limitations of the solution.
Explain reusable program components in the context of thinking ahead.
Reusing code saves time, resources, and reduces redundancy.
It is good to think ahead to which software parts could become reusable.
Explain caching and prefetching in the context of thinking ahead.
Caching:
Data and instructions which were removed from the disk to main memory can be kept in memory in case the code is needed again.
This increases the speed of the code running as less distance needs to be travelled to reach the code.
Prefetching:
An instruction or piece of data can be requested before it is actually needed and stored in cache registers.
This, however, requires complicated algorithms to predict the code needed.
Describe concurrency.
The situation where several things are happening simultaneously.
Describe concurrent processing.
When more than one process is being run from a program at once, with each being given a slice of processing time in turn.
What is the difference between parallel processing and concurrent processing?
Parallel: when more than one processor is executing separate instructions at the same time
Concurrent: when a single processor is executing separate instructions at the same time
What are the benefits of concurrent processing over parallel processing?
- There is increased program throughput (number of tasks completed in a set period)
- Processor time is not wasted
What are the benefits of parallel processing over concurrent processing?
- Several tasks can be performed simultaneously
- Huge performance increase for graphical processing
What are the downsides of concurrent processing over parallel processing?
- Can potentially slow down if many users request similar actions
What are the downsides of parallel processing over concurrent processing?
- Greater complexity with coordinating using more than processor or core
- Some programs aren’t particularly compatible with parallel processing