yujiri.xyz

Software

Learn programming for good instead of profit

Anatomy of a computer

Let's go through some of the hardware (physical) components of a computer.

The tradeoff between memory and storage (other than storage being able to persist without power) is that memory is much faster to access, but storage is much cheaper to build with a larger capacity, hence most computers have 8 or 16 GB of memory and a few hundred GB of storage.

There are actually other levels of this tradeoff. The processor has a tiny bit of memory stored right inside it, which is even faster for it to access than main memory, but more expensive to build, which is why it only has a tiny bit.

Caching

Caching is an important thing computers do to improve the performance of memory access. When the computer loads something from a slow place (like storage), it also stores a copy of it in a faster place (like main memory). The benefit is that the next time that data needs to be accessed, it doesn't have to be loaded from storage again. This is why, for example, if you start a big program like a web browser for the first time after booting a computer, it'll probably take a few seconds because it's loading all the relevant files from storage, but if you close it and open it again, it opens much faster because it's loading from memory.

Caching in used in other places too. For example, web browsers usually cache pages you've visited into files on your storage disk, so if you load the same page again (and the website confirms it hasn't changed since), it doesn't need to redownload it all.

Proxied content from gemini://yujiri.xyz/software/guide/anatomy.gmi

Gemini request details:

Original URL
gemini://yujiri.xyz/software/guide/anatomy.gmi
Status code
Success
Meta
text/gemini; lang=en
Proxied by
kineto

Be advised that no attempt was made to verify the remote SSL certificate.

What is Gemini?