CPU, Memory, Storage, and Operating Systems – Intro to CS, CSCE 110 – Study Notes
offline

Difficulty: Beginner | Prerequisites: Computer Fundamentals, Hardware, and System Components study notes


Big Picture

This picks up where the fundamentals left off and goes deeper into the components that make a computer actually work: how the CPU processes instructions, how RAM and secondary storage handle data at different speeds and permanence levels, and how the operating system ties it all together. If you understand these pieces, you understand what is happening every time you open an app, save a file, or your machine slows down. This is core exam material for any introductory computer science course.


TL;DR

The CPU fetches and executes instructions using its arithmetic-logic unit (ALU). RAM provides fast but temporary storage, while secondary storage (hard drives, USB drives) provides slow but permanent storage. The operating system manages all of these resources, handles multitasking, and provides the user interface you interact with, whether that is a command line or a graphical desktop.


Key Terms

Central Processing Unit (CPU)

The main processor of the computer, responsible for fetching instructions from memory and executing them. Often called the "brain" of the computer, though more precisely it is the engine: it does the work, but software provides the directions.

Microprocessor

Another name for the CPU. In simple terms, it is the single chip that does the computing.

Fetch-execute cycle

The fundamental process by which the CPU operates: it retrieves (fetches) an instruction from memory, then carries it out (executes it), then moves to the next instruction. This cycle repeats billions of times per second in a modern processor.

Arithmetic-Logic Unit (ALU)

The part of the CPU that performs all calculations (addition, subtraction, multiplication) and logical comparisons (checking whether two values are equal, whether one is greater than another). Think of it as the calculator inside the processor.

Primary memory / RAM (Random Access Memory)

Fast, temporary storage that holds data and programs while the computer is running. It is volatile, meaning everything in RAM disappears when you turn the power off.

Volatile memory

Memory that loses its contents when power is removed. RAM is the key example. In simple terms, if you pull the plug, RAM goes blank.

Non-volatile storage

Storage that retains its data even without power. Hard drives, SSDs, USB flash drives, and optical discs are all non-volatile.

Secondary storage

Long-term, non-volatile storage devices used to hold the operating system, applications, and user files permanently. Slower than RAM but far larger in capacity.

Hard drive

A secondary storage device that uses magnetic discs to store data. Provides large capacity at relatively low cost.

Optical disc

A storage medium (CD, DVD) that uses laser technology to read and write data.

Memory stick / USB flash drive

A small, portable secondary storage device that connects via USB. Handy for transferring files between machines.

Operating system (OS)

System software that manages hardware resources, runs applications, and provides a user interface. Windows, macOS, and Linux are common examples.

Memory management

The OS function of allocating and deallocating RAM to programs as they run. Ensures each program gets the memory it needs without stepping on other programs.

Device management

The OS function of coordinating input and output devices so they work correctly with running software.

File management

The OS function of organising data on storage devices into a logical structure (folders, directories, file names).

Process management

The OS function of handling running programs (processes) and multitasking, deciding which program gets CPU time and when.

Command-line interface (CLI)

A text-based way of interacting with the OS by typing commands at a prompt. Older systems like Unix and DOS relied on this. Still widely used by developers and system administrators.

Graphical User Interface (GUI)

A visual way of interacting with the OS using icons, windows, menus, and mouse clicks. Windows and macOS are the most common examples. Pronounced "gooey."


Core Content

How the CPU Works

  • The CPU operates on a continuous fetch-execute cycle: fetch an instruction from RAM, execute it, move to the next one.

  • Inside the CPU, the Arithmetic-Logic Unit (ALU) handles all maths and logical comparisons.

  • The CPU's speed and efficiency directly determine how fast the computer feels to the user.

  • The CPU also sends control signals to other components (RAM, storage, I/O devices) to coordinate operations.

Primary Memory (RAM)

  • RAM is the computer's working memory, holding whatever the CPU is actively using: currently running programs and the data they need.

  • It is extremely fast, which is why the CPU pulls instructions and data from RAM rather than from a hard drive.

  • It is volatile: power off, data gone. This is a critical distinction for exams.

  • A useful analogy: RAM is like a desk. The bigger the desk (more RAM), the more documents you can have open and work on at once. But when you leave (power off), the desk is cleared.

Secondary Storage

  • Secondary storage is where data lives permanently: the operating system, installed applications, your documents, photos, and music.

  • It is non-volatile. Turn the computer off, turn it back on, and your files are still there.

  • It is slower than RAM. This is the trade-off: permanence and capacity at the cost of speed.

  • Common types:

    • Hard drives (magnetic discs): large capacity, relatively cheap, mechanical parts make them slower

    • Optical discs (CDs, DVDs): portable, but lower capacity and largely being replaced

    • USB flash drives (memory sticks): small, portable, solid-state, no moving parts

RAM vs. Secondary Storage at a Glance

Feature

RAM

Secondary Storage

Speed

Very fast

Slower

Volatility

Volatile (data lost on power-off)

Non-volatile (data persists)

Capacity

Smaller (typically 8–64 GB)

Much larger (hundreds of GB to TB)

Purpose

Short-term working memory

Long-term file and program storage

Types of Software (Recap)

  • Application software serves the user directly: word processors, spreadsheets, browsers, games.

  • System software manages the machine: the operating system is the most important piece. It sits between the hardware and the applications.

The Operating System

  • The OS is the most important piece of system software. It starts when you turn the machine on and runs until you shut it down.

  • Five core functions:

    • Memory management – allocating and freeing RAM for programs

    • Device management – coordinating keyboards, mice, printers, monitors

    • File management – organising files and folders on storage devices

    • Process management – running programs, multitasking, deciding which process gets CPU time

    • User interface – giving the user a way to interact with the system

User Interfaces

  • Command-line interfaces (CLI) require the user to type text commands. Unix and DOS are classic examples. The CLI is powerful but has a steeper learning curve.

  • Graphical User Interfaces (GUI) let the user point, click, and drag using icons, windows, and menus. Windows and macOS use GUIs.

  • Both types of interface perform the same underlying functions. The difference is how the user communicates with the system, not what the system can do.


Real-World Applications

When your computer "freezes" or slows down, the most common cause is that RAM is full and the OS is swapping data to the much slower hard drive. This is the RAM-vs-storage speed difference playing out in real time. Understanding it is also why upgrading RAM often makes a bigger practical difference than upgrading storage capacity.


Common Misconceptions

  • Students frequently confuse RAM with storage. RAM is temporary and fast. Storage is permanent and slow. They are not the same thing, and exam questions will test this.

  • "Volatile" does not mean unstable or unreliable. It simply means data is lost when power is removed. RAM works perfectly while the power is on.

  • The operating system is not an application. It is system software. Students sometimes list the OS as an example of application software, which is incorrect.

  • A GUI and a CLI can exist on the same machine. Linux, for example, offers both. They are not mutually exclusive, and modern macOS still has a full command-line terminal underneath the GUI.


Why It Matters / Exam Flags

⚠️ The fetch-execute cycle is a staple exam topic. Know the steps: fetch the instruction from memory, execute it, repeat.

⚠️ Be prepared to explain why RAM is volatile and what that means in practice.

⚠️ Know the five functions of the operating system (memory, device, file, process management, and user interface).

⚠️ Be able to compare and contrast RAM and secondary storage across speed, volatility, capacity, and purpose.

⚠️ Understand the difference between a CLI and a GUI, with examples of operating systems that use each.


Quick Self-Test

  1. True or false: RAM retains its data when the computer is turned off. (False)

  1. Fill in the blank: The process of retrieving and carrying out instructions is called the - cycle. (Fetch-execute)

  1. True or false: The ALU handles both arithmetic and logical comparisons. (True)

  1. Fill in the blank: The five core functions of an operating system are memory management, device management, file management, _______ management, and user interface. (Process)

  1. True or false: A graphical user interface and a command-line interface can perform the same fundamental tasks. (True)


Practice Q&A

Q: Describe the fetch-execute cycle in your own words.

A: The CPU retrieves an instruction from RAM, carries out that instruction (which might be a calculation, a comparison, or a command to move data), and then moves to the next instruction. This cycle repeats continuously while the computer is running.

Q: Why is RAM described as "volatile," and what is the practical consequence?

A: Volatile means RAM loses all its stored data when the power is turned off. The practical consequence is that any work not saved to secondary storage (a hard drive, SSD, or USB drive) is lost if the computer shuts down unexpectedly.

Q: What is the ALU, and what two types of operations does it perform?

A: The ALU (Arithmetic-Logic Unit) is the part of the CPU that performs arithmetic operations (addition, subtraction, etc.) and logical comparisons (checking whether values are equal, greater than, or less than each other).

Q: List and briefly describe three of the five core functions of an operating system.

A: Memory management allocates and frees RAM for running programs. File management organises data into files and folders on storage devices. Process management handles running programs and multitasking, deciding which process gets CPU time.

Q: Compare RAM and secondary storage across two characteristics.

A: RAM is fast but volatile (data is lost on power-off). Secondary storage is slower but non-volatile (data persists without power). RAM is used for short-term working data; secondary storage holds files and programs long-term.

Q: What is the difference between a command-line interface and a graphical user interface?

A: A command-line interface requires the user to type text commands (e.g. Unix, DOS). A graphical user interface lets the user interact through icons, windows, and menus using a mouse (e.g. Windows, macOS). Both accomplish the same fundamental tasks; they differ in how the user communicates with the system.


Connections to Other Topics

The fetch-execute cycle connects to later topics on machine language and assembly programming, where you will see exactly what those fetched instructions look like. Memory management by the OS connects to data structures and how programs allocate memory at runtime. Understanding volatile vs. non-volatile storage becomes critical when studying databases and file systems later in the course.


Related Terms / Search Tags

CPU, central processing unit, microprocessor, fetch-execute cycle, ALU, arithmetic-logic unit, RAM, random access memory, volatile memory, non-volatile, secondary storage, hard drive, SSD, USB flash drive, optical disc, operating system, OS, memory management, device management, file management, process management, CLI, command-line interface, GUI, graphical user interface, Windows, macOS, Unix, DOS, intro to CS, CSCE 110