Computer Architecture Review

0.0(0)
studied byStudied by 0 people
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/8

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

9 Terms

1
New cards

What is a disk?

In a computer, a "disk" typically refers to a storage device used to store data, programs, and files.

A disk is the primary storage device in a computer. It is persistent, meaning the data will be persisted regardless of the state of the machine (turned on or off). Most modern computers store information in disk on the order of TBs (terabytes).

Recall that a byte is made up of 8-bits, and bit is the smallest unit of measure in computers - a binary measure represented by 00 or 11. A terabyte is 10121012 bytes, or a trillion bytes. A disk storage device like a USB drive might have storage on the order of GBs (gigabytes), which is 109109, or one billion bytes.

You might have come across the terms: HDD and SSD. Hard disk drives (HDD) and Solid-state drive (SSD) are both persistent storage devices, with the latter one being more popular and faster. However, it does generally cost a bit more.

2
New cards

What is a RAM?

RAM is like your computer's short-term memory that helps it run programs, work on tasks, and handle multitasking efficiently. The more RAM your computer has, the smoother and faster it can handle various activities.

Just like you need a workspace to do your homework or play with toys, a computer needs RAM to work on tasks and run programs.

Random Access Memory is also used for storing information but is typically a lot smaller in size compared to disk drives. RAM sizes generally vary from 1GB - 128GB because RAM is much more expensive than disk space. The benefit is that reading and writing to RAM is significantly faster than disk. For instance, writing 1 MB of data to RAM might take on the order of microseconds (millionths of a second, or 1/1061/106 seconds), while writing the same amount to a disk might take on the order of milliseconds (thousandths of a second, or 1/1031/103 seconds)."

RAM keeps the applications you have open in memory, include any variables your program has allocated. It is often described as volatile memory, meaning that the data gets erased once the computer is shut down. This is why it is important to save your work to disk before shutting down your computer.

It is important to note that the RAM and disk do not directly communicate with each other. They rely on the CPU to facilitate data transfer between them.

- hardware limitations for ram

3
New cards

Is the RAM persistent?

No, RAM (Random Access Memory) is not persistent. This means that any data stored in RAM is lost when the computer is turned off or restarted. RAM is used for temporary storage while a device is on, storing data that the CPU needs to access quickly. When power is lost, the data in RAM disappears, unlike data on a hard drive or SSD, which remains even when the computer is off

4
New cards

Why is RAM more expensive than disk space?

RAM is more expensive than disk space because it’s made with faster, higher-quality components that allow it to process data extremely quickly. RAM is built to handle rapid reading and writing without delays, whereas disk space (like on an HDD or SSD) is designed for slower, longer-term storage. The speed, low latency, and durability required for RAM make it costly to manufacture compared to disk storage.

5
New cards

Why is reading and writing to RAM significantly faster than to disk?

Reading and writing to RAM is much faster than to disk because RAM is an electronic, volatile memory, optimized for speed. It’s directly connected to the CPU and allows immediate access to data, unlike disks, which use slower, mechanical, or flash-based storage mechanisms. RAM allows programs and data to be accessed in nanoseconds, while reading or writing to disk takes much longer due to the need to find and retrieve the data physically or electronically.

6
New cards

What is a CPU?

A CPU, or Central Processing Unit, is like the brain of a computer.

Responsible for all the thinking and calculations that allow you to use your computer

for various tasks, like playing games, browsing the internet, or doing schoolwork.

Imagine your computer is like a big kitchen with lots of ingredients and recipes.

The CPU is the chef who reads the recipes (instructions from programs), processes the ingredients (data), and cooks the meals (performs calculations and operations).

Provides the instructions and processing power the computer needs to do its work. The more powerful and updated your processor, the faster your computer can complete its tasks.

The central processing unit (CPU) is the intermediary between the RAM and disk. Also referred to as the "brain" of the computer; it reads/writes from the RAM and disk(s).

For example, when you write code and run it, your code is translated into a set of binary instructions stored in RAM. This sentence could be made clearer: "The CPU reads and executes these instructions, which may involve manipulating data stored elsewhere in RAM or on disk. An example of reading from disk, would be opening a file in your file system and reading it line-by-line.

All computations are done within the CPU, such as addition/subtraction/multiplication etc. This occurs in a matter of milliseconds. It fetches instructions from the RAM, decodes those instructions and executes the decoded instructions. On the lowest level, all these instructions are represented as bytes.

The CPU also consists of a cache. A cache is extremely fast memory that lies on the same die as the CPU.

7
New cards

What are Caches?

Creating copies of data so that it can be fetched faster in the future

Making network requests, reading disks can be expensive so our browsers will sometimes cache data (using a lot of resources)

Speed is the name of the game for applications

A quick storage place where you can store and retrieve data easily.

Most CPUs have an L1, L2, and L3 cache, which are physical components that are much faster than RAM, but they only stores data on the order of KBs or tens of MBs.

Whenever a read operation is requested, the cache is checked before the RAM and the disk. If the data requested is in the cache, and is unchanged since the last time it was accessed, it will be fetched from the cache, and not the RAM. Reading and writing to the cache is a lot faster than RAM and disk. It is up to the operating system to decide what gets stored in the cache.

Caching is an important concept applied in many areas beyond computer architecture. For example, web browsers use cache to keep track of frequently accessed web pages to load them faster. This stored data might include HTML, CSS, JavaScript, and images, among other things. If the data is still valid from the time the page was cached, it will load faster. But in this case, the browser is using the disk as cache, because making internet requests is a lot slower than reading from disk.

The cache being part of the CPU is only part of the reason why it is faster than RAM. Cache is what's known as SRAM. If you are interested, you might view this resource from [MIT](https://ocw.mit.edu/courses/6-004-computation-structures-spring-2017/pages/c14/c14s1/#19), which gives a gentle introduction.

8
New cards

What is an Operating System?

An operating system (OS) is a software that acts as an intermediary between computer hardware and the user. It provides a set of services and functionalities that allow users and applications to interact with the computer hardware.

The operating system manages resources such as memory, processors, file systems, and devices. Key functions of an operating system include process management, memory management, file system management, and user interface interaction.

Common examples of operating systems include Microsoft Windows, macOS, Linux, and Android.

9
New cards

What is a GPU?

A GPU stands for Graphics Processing Unit — it's a specialized computer chip that handles lots of small calculations really fast, especially ones related to images, videos, and graphics.

🧠 Simple Explanation:

Imagine your computer has two brains:

  • 🧠 CPU: good at doing a few tasks at a time (like a smart manager)

  • GPU: good at doing thousands of tiny tasks at once (like a huge team of workers)

So instead of one strong brain doing all the work, the GPU spreads it across many little brains working in parallel.