2.1 Computational Thinking Flashcards
Define Abstraction
Abstraction is the process of seperating ideas from reality to remove unnecessary detail.
What are the advantages of abstraction?
- It reduces the processing and memory resources required
- It reduces the effort required for programming and design by making the problem less complex
What are the five primitive data types in OCR ERL?
Integer - Whole number
Float - Any number
Character - One symbol
String - Many symbols
Boolean - True or False
What is caching?
Storing data that has been used recently in cache or RAM to allow for faster access if it is needed again.
What are the advantages of resuable program components?
- They can be used in future programs, saving time
- They may have already been tested, saving time
- Easier error correction and maintenance as errors in the reusable components only need to be fixed once, saving time
- Code only needs to be written once, saving time
Define decomposition
Decomposition is splitting a problem down into smaller parts/sub-procedures/modules
Define concurrent processing
One process/thread does not need to finish before another one begins, so multiple processess can be happening, or appear to happen, at the same time.
What are the two ways to do concurrent processing?
- Multiple Processors each run different threads (parallel processing)
- One processor allocates slices of time to multiple threads
Define precondition
A requirement for the form data must be in in order to be processed by a function
What are the disadvantages of caching?
- It requires space in memory that could be used for other things
- If the data cached isn’t reused it takes up uncessisary processing time
Wht are the benefits of concurrent processing?
- Tasks can be completed more efficiently
- Users can do multiple things at the same time
What are the disadvantages of concurrent processing?
- It’s more complicated to program because data colisions and race conditions need to be taken into account
- Individual tasks may be completed more slowly with some implementations