Computer Science Comprehensive Exam
Notes
1. System Software & Application Software
System Software
System software is the backbone of the computer. It is the set of programs that manages and
controls the computer hardware and provides a platform for application software to run. It acts
as an interface between the hardware, the user, and the application software.
Types of System Software:
1. Operating Systems (OS): The core software that manages resources (Windows,
macOS, Linux).
2. Utility Software: Maintenance tools (Antivirus, Disk Defragmenter).
3. Device Drivers: Translators that allow the OS to talk to hardware.
4. Firmware: Permanent software programmed into read-only memory (BIOS).
General Features of System Software:
● Machine-oriented: Written to interact directly with hardware architecture.
● Background Operation: Runs automatically when the computer starts; the user rarely
interacts with it directly.
● Essential: Without it, a computer cannot function properly.
Examples of Typical System Software:
● Windows 11, macOS, Android (Operating Systems).
● NVIDIA GeForce Drivers (Device Drivers).
● Norton 360, WinZip (Utilities).
Application Software
Application software is designed to help users perform specific, productive tasks. If System
Software is the "musician," Application Software is the "sheet music" being played.
Types of Application Software:
1. General Purpose: Software capable of performing many different tasks (e.g., Word
Processors, Spreadsheets).
2. Special Purpose: Software designed for a single, specific task (e.g., Payroll systems,
Hotel booking systems).
3. Customized (Bespoke): Software tailor-made for a specific organization’s unique needs
(e.g., a missile guidance system for the military).
General Features of Application Software:
● User-oriented: Designed with a focus on human interaction.
● Task-specific: Focuses on output (documents, images, calculations).
● Dependent: Runs on top of the System Software.
Examples of Typical Application Software:
● Microsoft Word, Excel (General Purpose).
● Adobe Photoshop (General Purpose).
● School Attendance System (Special Purpose).
2. Utility Software & Security
Utility Software (Utilities)
Utilities are specialized programs designed to maintain, analyze, configure, and optimize the
computer system. They ensure the computer continues to run efficiently.
Malware
Malware (Malicious Software) is designed to damage, disrupt, or gain unauthorized access to a
computer.
● Viruses: Attach to clean files and replicate when the file is opened.
● Worms: Self-replicating programs that spread across networks without human action.
● Trojans: Disguised as legitimate software to trick users into installing them.
● Ransomware: Encrypts user data and demands payment for the decryption key.
Anti-Virus Software
Software designed to detect, prevent, and remove malware. It works in two main ways:
1. Signature Checking: Compares files against a known database of virus "signatures."
2. Heuristic Checking: A smart method used to detect unknown viruses by analyzing
suspicious behavior (e.g., a file trying to modify system files).
Key Concepts in Anti-Virus:
● Quarantine: Instead of deleting an infected file immediately (which might delete
important data), the antivirus isolates the file in a secure area where it cannot run. This
allows the user to decide whether to delete or restore it.
● False Positive: When the antivirus mistakenly flags safe, legitimate software as
malware.
● False Negative: When the antivirus fails to detect a piece of actual malware.
Disk Maintenance
● Disk Defragmenter:
○ The Problem: Over time, files get split up (fragmented) and saved in gaps all over
the hard drive.
○ The Solution: Defragmentation reorganizes these scattered parts so files are
stored in contiguous (side-by-side) blocks.
○ Benefit: Increases read/write speed because the read head doesn't have to move
as much.
○ Note: SSDs do not need defragmentation (it damages them).
● Disk Cleanup (The "Opposite"): While defrag organizes data, Disk Cleanup removes
unnecessary files (temporary internet files, trash, old updates) to free up storage space.
Back-Up Utilities
Backup software creates copies of important files to restore in case of data loss.
● File History (Windows): Automatically backs up versions of files to an external drive at
set intervals, allowing you to "go back in time".
● Time Machine (macOS): Similar to File History; takes snapshots of the system so you
can restore the entire OS or specific files from a specific date.
Screensavers
Historically, screensavers were a technical necessity. On old CRT (Cathode Ray Tube) and
early Plasma monitors, if an image stayed still for too long, the phosphors would physically burn
into the glass, leaving a permanent "ghost image" (known as burn-in).
● The Function: A screensaver is a program that fills the screen with moving images or
patterns when the computer is idle.
● Modern Use: Today’s LCD and LED monitors don't really suffer from burn-in.
Screensavers are now used for:
○ Security: Automatically locking the workstation so a password is required to
return.
○ Power Management: Though technically, "turning the screen off" is better for
power, screensavers can signal the PC to enter a low-power state.
○ Background Tasks: Some screensavers run virus scans or distributed
computing tasks (like searching for signals in space) while the user is away.
3. Operating System (OS) Functions & Management
The Operating System (OS) is the critical software that manages all hardware and software
resources.
I. Memory Management
This is one of the most complex tasks of the OS. It manages the computer's primary memory
(RAM).
● Allocation: The OS decides exactly which block of RAM is assigned to which program.
When you open "Chrome," the OS finds free space and assigns it.
● Protection: It ensures that one program cannot access the memory of another program.
(e.g., A game cannot accidentally overwrite the memory used by your Word document).
● Virtual Memory: When RAM is full, the OS moves inactive data to the hard drive
(paging) to free up RAM for active tasks. This trick makes the computer feel like it has
more RAM than it actually does.
● Deallocation: When you close a program, the OS marks that memory space as "free"
so it can be used again.
II. Security Management
The OS is responsible for internal security and access control.
● User Authentication: Verifies who is using the computer (Passwords, Biometrics like
Fingerprint/FaceID).
● Access Rights: Checks if the logged-in user has permission to open a specific file.
(e.g., A "Guest" user cannot open "Admin" folders).
● Encryption: Many modern OSs encrypt data on the disk so that if the hard drive is
stolen, the data cannot be read without the password.
● Firewall Services: Monitors incoming and outgoing network traffic to block unauthorized
access.
III. Hardware & Peripheral Management
The OS acts as the bridge between software and hardware.
● Device Drivers: The OS uses drivers to translate commands into signals the hardware
understands.
● I/O Control: It manages inputs (Keyboard, Mouse) and outputs (Monitor, Printer).
● Interrupt Handling: The OS catches signals from hardware (like a mouse click) and
tells the CPU to process them immediately.
IV. File Management
The OS organizes how data is stored on the disk.
● Directory Structure: It maintains the hierarchy of Folders and Sub-folders.
● File Allocation Table (FAT) / NTFS: The OS keeps a "map" of where every file is
located on the hard drive sectors.
● Naming Conventions: Enforces rules for file naming (e.g., cannot use special
characters like ? or * in filenames).
● Access Control: Determines who can Read, Write, or Delete a file.
V. Multitasking (Process Management)
Multitasking allows the computer to run multiple programs effectively.
● The Illusion: On a single-core CPU, true simultaneous processing is impossible. The
CPU can only process one instruction at a time.
● Time Slicing (Scheduling): The OS slices CPU time into tiny fractions (milliseconds). It
gives 5ms to Spotify, 5ms to Word, 5ms to Chrome. It switches so fast (billions of times
a second) that it appears simultaneous to the human eye.
● Process States: The OS tracks if a program is "Running," "Waiting" (for input), or
"Ready" (waiting for CPU time).
VI. User Account Management
● Administrator: A "Super User" with full control. Can install software, change system
settings, and access all files.
● Standard User: Restricted access. Can use software but cannot make system-changing
decisions (prevents accidental damage or malware installation).
4. Interfaces & Descriptors
HCI: How We Talk to Computers
HCI (Human-Computer Interaction) is the study and design of how people and computers
work together. The most visible part of this is the User Interface (UI).
1. CLI (Command Line Interface)
This is the "old school" hacker-style interface where the user interacts solely by typing text
commands.
● How it works: You type a specific command (e.g., dir or ls), and the computer
executes it immediately.
● Advantages: It is text-based and much faster for experts who know the commands; it
also uses very little RAM/processing power.
● Disadvantages: It has a steep learning curve; you must memorize commands and
syntax, and one typo can cause an error.
2. GUI (Graphical User Interface)
This is what most people use today. It uses visual elements to represent tasks.
● WIMP: This is the standard framework for a GUI, standing for Windows, Icons, Menus,
and Pointers.
○ Windows: Areas of the screen dedicated to different programs.
○ Icons: Small pictures representing files or apps.
○ Menus: Lists of options or commands.
○ Pointer: An on-screen symbol (arrow) that moves with your mouse to select
items.
● Advantages: Extremely intuitive and beginner-friendly; no need to memorize
commands.
● Disadvantages: Uses significantly more system resources (RAM/CPU) to render the
graphics.
Feature CLI (Command Line) GUI (Graphical)
Ease of Use Hard; requires memorization. Easy; visual and intuitive.
Speed Faster for experts. Slower for complex tasks.
Resources Low RAM/CPU usage. High RAM/CPU usage.
Customization High (scripting/automation). Limited by the visual layout.
3. Post-WIMP Interfaces
We are now moving beyond the mouse and keyboard. Post-WIMP refers to interfaces that use
more "natural" human actions.
● Touchscreen: Using fingers to pinch, swipe, and tap.
● Haptic/Gestures: Using body movements (like on a VR headset or gaming console).
● Voice Recognition: Interacting through spoken commands (like Siri or Alexa).
Device Drivers & Descriptors
● Device Drivers: Small programs that act as a "manual" for the OS, telling it how to
operate a specific piece of hardware (e.g., a Printer Driver tells Windows how to print to
an HP printer).
● Descriptors (Device Descriptors):
○ Definition: When you plug in a device (like a USB drive), it sends a "Descriptor"
to the OS. This is a data structure (a small block of information) that tells the OS
what the device is.
○ Function: It contains the Device ID, Vendor ID, and capabilities (e.g., "I am a
Logitech Mouse, I have 3 buttons and a scroll wheel").
○ Why it matters: Without the descriptor, the OS wouldn't know which driver to load
for the device.
5. Buffers, Spooling & Booting
Buffers & Spooling
● Buffer: A temporary storage area in memory. It holds data when it is being moved
between two devices that work at different speeds.
○ Example: The CPU is fast, the Printer is slow. The CPU sends the document to a
buffer and goes back to work. The Printer slowly pulls data from the buffer.
● Spooling: The process of placing data into a buffer (e.g., "Print Spooler").
The Booting Process (Starting Up)
Booting is the sequence of events that occurs from the moment you press the power button until
the Operating System (OS) is ready for user input. It’s essentially the computer "pulling itself up
by its own bootstraps."
1. Power On & BIOS/Firmware: When electricity hits the motherboard, the CPU looks at a
specific address in the ROM (specifically an EEPROM chip) to find the BIOS (Basic
Input Output System). BIOS is a type of firmware—permanent software programmed
into hardware.
2. POST (Power-On Self-Test): The BIOS runs a diagnostic test to ensure hardware like
RAM, the keyboard, and disk drives are connected and functioning.
3. CMOS Check: The BIOS consults the CMOS chip, which is powered by a small battery
to store system configuration settings (like the date, time, and boot order) even when the
PC is off.
4. The Bootstrap Loader: This is a small program within the BIOS. Its sole job is to locate
the Operating System on the hard drive (or SSD) and load the kernel into the RAM.
5. OS Takes Control: Once the kernel is in RAM, the OS takes over, initializes device
drivers, and presents the login screen.
Hardware Components in Booting
● BIOS (Basic Input Output System): The startup firmware stored in EEPROM.
● Firmware: Software that is permanently etched into a hardware chip.
● EEPROM (Electrically Erasable Programmable Read-Only Memory): The type of
chip where BIOS is stored. It is "Read-Only" but can be updated (flashed) electronically.
● CMOS Chip: A small volatile memory chip powered by a coin battery. It remembers the
date, time, and system settings even when the PC is unplugged.
6. Interrupts
What is an Interrupt?
An interrupt is a signal sent to the CPU telling it to stop its current task and attend to a more
urgent task.
How are Interrupts Caused?
1. Hardware: A printer runs out of paper; a key is pressed on the keyboard.
2. Software: A program crashes (division by zero error); a program requests a file.
3. Timing: The system clock signals that it’s time to switch to the next task (multitasking).
Servicing an Interrupt (The ISR Cycle)
When an interrupt happens, the CPU follows these steps:
1. Pause: Completes the current instruction but pauses the program.
2. Save: The Program Counter (PC) (which holds the address of the next instruction) is
saved to a stack in memory so the CPU knows where to return later.
3. Identify: The CPU checks the Interrupt Priority. (e.g., "Power Failure" > "Keyboard
Press") .
4. Execute ISR: The CPU runs the Interrupt Service Routine (ISR), which is the code
that handles the specific event.
5. Restore: Once the ISR is done, the CPU reloads the saved Program Counter.
6. Resume: The original program continues as if nothing happened.
How Interrupts Help Multitasking: Interrupts are the mechanism that allows the OS to switch
tasks efficiently. The system timer sends an interrupt every few milliseconds, forcing the CPU to
pause Program A and switch to Program B.
7. Programming Languages, Translators & IDEs
Levels of Language
1. Machine Code (1st Gen):
○ The only language the computer understands.
○ Binary instructions (1s and 0s).
○ Extremely difficult for humans to read/write.
2. Low-Level Language / Assembly (2nd Gen):
○ Uses Mnemonics (short codes) instead of binary.
○ Specific to the processor architecture.
○ Must be translated by an Assembler.
○ Common Assembly Instructions:
■ LDA: Load Data to Accumulator.
■ ADD: Add value to Accumulator.
■ STO: Store Accumulator value to Memory.
3. High-Level Language (3rd Gen):
○ Close to human language (English-like).
○ Portable (works on different computers).
○ Examples: Python, Java, C++.
○ Must be translated by a Compiler or Interpreter.
Comparison:
● Low-Level Advantages: Direct control of hardware, very memory efficient, executes
extremely fast.
● Low-Level Disadvantages: Hard to learn, code is long and complex, hard to debug.
● High-Level Advantages: Easy to learn/debug, writes code quickly, portable.
● High-Level Disadvantages: Slower execution (due to translation layers).
Translators
Software that converts source code into machine code.
1. Assembler:
○ Translates Assembly $\rightarrow$ Machine Code.
2. Compiler:
○ Translates the High-Level source code $\rightarrow$ Machine Code all at once.
○ Creates an executable file (.exe).
○ Pros: Fast execution (don't need to translate again), code is hidden from user.
○ Cons: Harder to debug (lists all errors at the end).
3. Interpreter:
○ Translates High-Level code $\rightarrow$ Machine Code line-by-line while
running.
○ Pros: Great for debugging (stops immediately at error), easy to test small parts.
○ Cons: Slower execution (translates every time you run it).
The IDE Components (Integrated Development Environment)
An IDE isn't just one program; it’s a "toolbox" for programmers. Here is how that toolbox works:
Code Editor
This is the specialized "Word Processor" for programmers. Unlike a standard text editor (like
Notepad), a Code Editor is "language-aware."
● Line Numbering: Crucial for finding errors reported by the compiler.
● Syntax Highlighting: It colors different parts of the code (e.g., variables in blue, strings
in orange, keywords in purple) so the human eye can spot mistakes instantly.
A Runtime Environment with a Debugger
● Runtime Environment: This is a "sandbox" provided by the IDE that allows you to run
your program to see if it works without having to exit the IDE or install extra software.
● Debugger: This is the most powerful tool for a programmer. It allows you to:
○ Breakpoints: Tell the program to "freeze" at a specific line so you can see
what’s happening.
○ Variable Watch: Look inside the computer's "brain" to see exactly what value a
variable holds at that exact moment.
○ Stepping: Move through the code one single line at a time to find exactly where
it logic goes wrong.
Error Diagnostics
When your code fails, the IDE doesn't just say "it's broken." It provides a diagnostic report.
● Syntax Errors: It identifies "grammar" mistakes in the code (e.g., a missing colon).
● Logical/Runtime Errors: It points out why a program crashed (e.g., trying to divide by
zero).
● Underlining: Most modern IDEs use "wavy red lines" (like a spell-checker) to show
errors before you even try to run the code.
Auto-Correction & Auto-Completion
● Auto-Completion (IntelliSense): As you type pri..., the IDE suggests print().
This prevents typos and speeds up coding because you don't have to remember every
exact command name.
● Auto-Correction: If you open a bracket ( but forget to close it ), the IDE will often insert
the closing bracket ) for you automatically.
Auto-Documenter
In professional coding, you must explain what your code does (Comments). An Auto-
Documenter scans your code, looks for your comments, and automatically generates a
professional PDF or Website "Manual" for your software. It saves weeks of manual writing.
PrettyPrinting
This is the "makeup" for your code. If your code is messy (no spaces, bad indentation),
PrettyPrinting automatically reformats it.
● Indentation: It ensures all if statements and loops are tucked in properly so the
structure is visually clear.
● Spacing: It adds standard spacing around operators (e.g., changing x=5+y to x = 5 +
y).
Report Window
Located at the bottom of the IDE, this is the communication hub.
● Output: It shows what your program prints out.
● Console: It allows you to type input into your program.
● Build Logs: It shows the history of the Compiler. If the compilation failed, the Report
Window lists every single error, the line number it occurred on, and a description of the
"crime."
Tool Purpose "Extreme Knowledge" Tip
Screensaver Prevent Burn-in / Modern monitors use them for
Security security/locking, not hardware
protection.
Debugger Find logic bugs Use "Stepping" to execute code line-by-
line.
PrettyPrinting Readability Standardizes indentation so other
programmers can read your work.
Auto- Documentation Uses comments (like # or //) to build a
Documenter technical manual.
Report Window Feedback The "Output" or "Console" area where
errors are listed.