2.1.2 Thinking Ahead Flashcards
What is caching?
The temporary storage of data by the system in cache or memory for the benefit of faster retrieval if its needed again in the future
What are inputs?
Any information relevant to the problem that is required by the system for processing according to an algorithm
What are outputs?
The result returned by a system for a given input after running the entire process or part of a process
What are preconditions?
A prerequisite or state of a system and its surroundings required to run a use case return a valid solution
What are reusable program components?
Components that have already been written, debuggedtested that can be transplanted into new systems to save development time in project completion
What are examples of input devices in a system?
Touch screen, magnetic stripe card reader, keypad
What are examples of output devices in a system?
Monitor, cash dispenser, printer, speakers
What do preconditions allow for?
They define the valid input the subroutine expects and are usually included in documentation.
This allows the subroutine to safely assume inputs meet specific criteria, reducing the need for checks within the code.
What are the advamtages of chaching?
Stores frequently used data or instructions for faster access
Reduces loading times ( for web pages)
Frees up bandwidth by avoiding repeated downloads
Can improve performance significantly when combined with prefetching (predicting likely needed data)
What are disadvantges of caching?
Effectiveness depends on accuracy of caching/prefetching algorithms
Incorrect predictions waste memory and processing time
Larger caches take longer to search
Limited cache size restricts how much can be stored
What are the advantages of reusable components?
Already tested and debugged, so more reliable
Saves time, money, and development resources
Can be reused with different inputs for various outputs
Useful across multiple projects, reducing future development costs
What are the disadvantages of reusable components?
May face compatibility issues with existing software
Third-party components might need modification
Adapting them can be more costly and time-consuming than building from scratch