Define caching.
The process of storing previously used data in a location (cache) so that it can be quickly accessed to speed up retrieval if it is needed in the future.
Define pre-fetching.
Data is fetched and stored in a cache or buffer before it is needed.
Define a cache miss.
Occurs when a system or application requests data from a cache, but the data is not found
Define a library.
A collection of reusable subroutines that a programmer can “call” when writing code so that the programmer doesn’t have to write this code.
Define reusable components.
Use of existing assets in some form within the software product development process including code e.g. subroutine and designs.
Why do CPUs have onboard cache?
To store frequently used data/instructions.
Why is it faster to access the cache than it is to access main memory (RAM)?
What is the hierarchy of CPU cache?
L1 (smallest + quickest) to L3
What happens if the processor needs to read or write a location in memory?
It first checks for a corresponding entry in the cache. If the processor finds that the memory location is in the cache, a cache hit has occurred and the processor immediately reads/writes to the cache. If not, a cache miss has occurred and the data is copied from main memory into cache and the request fulfilled from cache.
What is a pro of CPU cache?
Faster response time.
What are cons of CPU cache?
What is hard drive cache (HDC) also known as?
A disk buffer.
What does hard drive cache store?
The most recent and frequently used programs/data from the drive.
What happens when the CPU requests data from the hard disk?
Modern hard disks come with fast memory, around 512 kilobytes. The hard-disk controller checks this memory before moving the mechanical parts of the hard disk (slow compared to memory). If it finds the data that the computer asked for in the cache, it will return the data stored in the cache without actually accessing data on the disk itself, saving a lot of time.
What is a pro of hard drive cache?
Faster response time.
What are cons of hard drive cache?
What does web browser cache store?
Frequently used web pages to reduce the number of requests that go to web server.
What are pros of web browser cache?
What is a con of web browser cache?
Cached resource may be but of date.
What are proxies?
Proxies act as intermediaries between the client and the origin server.
What does a cache server store? (proxy server)
Previously requested web pages or other content.
What are pros of a cache server?
What is a con of a cache server?
Cached resources might be out of date.
What is a DNS? (Domain name system)
It is used to resolve a particular domain name to its IP equivalent