Operating Systems
Understanding the software that manages your computer
What is an Operating System?
An operating system (OS) is a collection of programs that manage the computer's hardware and provide services for application software. It acts as an intermediary between users, applications, and hardware.
The Layered Structure
Each layer only communicates with the layers directly above and below it
- Desktop/Laptop: Windows, macOS, Linux (Ubuntu, Fedora)
- Mobile: Android, iOS
- Servers: Windows Server, Linux (Red Hat, CentOS)
- Embedded: Real-time OS in cars, appliances, IoT devices
1. User Interface
What is a User Interface?
The user interface (UI) is how users interact with the computer. The operating system provides the interface that allows users to give commands and receive feedback.
Graphical User Interface (GUI)
Uses windows, icons, menus, and pointers (WIMP). Most common on desktops and phones.
- Windows and dialog boxes
- Icons representing files/programs
- Menus with options
- Mouse/touch pointer control
Examples: Windows desktop, macOS Finder, Android home screen
Command Line Interface (CLI)
Text-based interface where users type commands. Preferred by advanced users and administrators.
- Text commands typed at a prompt
- Powerful for automation/scripting
- Lower resource usage
- Steeper learning curve
Examples: Windows Command Prompt, PowerShell, Linux Terminal, macOS Terminal
Features of a User Interface
| Feature | GUI | CLI |
|---|---|---|
| Ease of learning | Easy - visual and intuitive | Difficult - must learn commands |
| Speed of use (expert) | Slower - many clicks needed | Faster - direct commands |
| Memory/processor usage | Higher - graphics need resources | Lower - text only |
| Automation | Limited | Excellent - scripts can automate tasks |
| Error prevention | Better - visual feedback, confirmations | Worse - easy to make typos |
2. Memory Management and Multitasking
What is Memory Management?
Memory management is how the OS controls and coordinates computer memory (RAM). It allocates memory to programs, keeps track of what memory is in use, and reclaims memory when programs close.
Key Memory Management Functions
| Function | What It Does | Why It's Important |
|---|---|---|
| Allocation | Assigns portions of RAM to applications when they start | Applications need memory to store data and instructions |
| Tracking | Keeps a record of which memory locations are in use and which are free | Prevents programs from overwriting each other's data |
| Protection | Prevents one program from accessing another program's memory | Security and stability - one crash doesn't affect others |
| Deallocation | Reclaims memory when programs close or no longer need it | Frees up memory for other applications to use |
Transfer of Data Between Memory
The OS manages the movement of data between different types of storage:
- Secondary Storage → RAM: When you open a program, the OS loads it from the hard drive/SSD into RAM
- RAM → CPU Cache: Frequently used data is copied closer to the CPU for faster access
- RAM → Secondary Storage: When you save a file, data moves from RAM to permanent storage
- Virtual Memory: When RAM is full, the OS can use part of the hard drive as temporary RAM
How Multitasking Works
Multitasking allows multiple programs to run "simultaneously" on a computer. The OS achieves this through:
Time Slicing
CPU switches between tasks very quickly, giving each a small "slice" of time. Appears simultaneous to users.
Scheduling
OS decides which program runs next and for how long based on priority and requirements.
Memory Partitioning
Each program gets its own section of RAM. OS prevents programs from interfering with each other.
- Allocates memory to each application
- Rapidly switches CPU between them (e.g., 100 times per second)
- Prioritises the application you're actively using
- Keeps Spotify playing audio even while you type in Word
3. Peripheral Management and Drivers
What is Peripheral Management?
Peripherals are external devices connected to a computer (printers, keyboards, mice, monitors, USB drives, etc.). The OS manages communication between the CPU and these devices.
The Challenge
Each peripheral device is different - a printer works differently from a keyboard. The OS needs to:
- Detect when devices are connected or disconnected
- Establish communication with each device
- Transfer data to and from devices
- Handle multiple devices wanting attention at once
Device Drivers
A driver is a small program that translates between the operating system and a specific hardware device. It allows the OS to communicate with hardware without needing to know exactly how each device works internally.
| Component | Role |
|---|---|
| Application | Says "print this document" |
| Operating System | Receives print request, passes to printer driver |
| Printer Driver | Translates request into specific commands the printer understands |
| Printer Hardware | Receives commands and prints the document |
Data Transfer Between Devices and Processor
The OS manages how data flows between peripherals and the CPU:
- Interrupts: Devices signal the CPU when they need attention (e.g., keyboard key pressed)
- Buffers: Temporary storage areas that hold data during transfer (e.g., print queue)
- I/O Scheduling: OS decides which device requests to handle first
- Plug and Play: OS automatically detects new devices and loads appropriate drivers
- You install the card (hardware)
- The OS detects new hardware
- You install the graphics driver (software)
- The driver enables the OS to use all the card's features
- Without the correct driver, the card may not work or work poorly
4. User Management
What is User Management?
User management controls who can access the computer, what they can do, and keeps each user's data separate and secure. This is essential for shared computers (schools, offices, families).
User Management Functions
| Function | What It Does | Example |
|---|---|---|
| Account Allocation | Creates and manages user accounts | Creating a new student account "jsmith" on the school network |
| Authentication | Verifies user identity (login) | Checking username and password match records |
| Access Rights | Controls what each user can access and modify | Students can read shared resources but not delete them |
| Resource Quotas | Limits how much storage/resources each user can use | Each student gets 500MB of network storage |
| Security Policies | Enforces password rules and security settings | Passwords must be 8+ characters and changed every 90 days |
| Audit Logging | Records user activities for security monitoring | Logging when users log in/out and what files they access |
Types of User Accounts
Administrator
Full control - install software, change settings, manage other users
Standard User
Normal use - run programs, access own files, limited settings
Guest
Minimal access - temporary use, no personal storage
Access Rights in Detail
The OS controls permissions at multiple levels:
- File Level: Who can read, write, or execute specific files
- Folder Level: Who can view folder contents, create/delete files within
- Application Level: Who can run certain programs
- System Level: Who can change system settings, install software
- IT Admin: Can access all files, install software, create/delete accounts
- Teachers: Can access teaching resources, own files, student submission folders
- Students: Can access own files and read-only shared resources
- Each user only sees and can modify what they have permission for
5. File Management
What is File Management?
The file management system organises how data is stored, retrieved, and organised on storage devices. It provides the folder structure and file operations users interact with daily.
Key File Management Features
| Feature | What It Does | Example |
|---|---|---|
| Naming | Assigns names to files so they can be identified | homework.docx, photo_001.jpg |
| Extensions | File type indicators that tell OS which program to use | .docx = Word, .pdf = PDF reader, .py = Python |
| Folder Organisation | Hierarchical structure for grouping related files | Documents → School → Year 10 → Computing |
| Moving/Copying | Relocating or duplicating files between locations | Moving photos from Downloads to Pictures folder |
| Saving | Writing data from RAM to permanent storage | Pressing Ctrl+S to save your document |
| Deleting | Removing files (often to Recycle Bin first) | Deleting old files to free up space |
| Searching | Finding files by name, content, or properties | Searching for "homework" to find all matching files |
| Properties/Metadata | Storing information about files (size, date, type) | Date created: 15/01/2025, Size: 2.4 MB |
File Paths
A file path is the complete location of a file in the folder hierarchy:
macOS/Linux: /home/jsmith/Documents/Computing/homework.docx
How File Management Works
- File System: The OS uses a file system (like NTFS on Windows or APFS on Mac) to organise data on the disk
- File Allocation Table: The OS keeps a record of where each file is physically stored on the disk
- Fragmentation: When files are deleted, gaps appear. The OS may spread new files across these gaps (fragmentation)
- Permissions: File management integrates with user management to control who can access each file
File Operations
Create
Make a new file and allocate storage space
Open
Load file from storage into RAM
Read
Access contents of a file
Write
Modify or add to file contents
Close
Finish using file, save changes
Delete
Remove file and free storage
Summary: Operating System Functions
| Function | Purpose | Key Actions |
|---|---|---|
| User Interface | Allow users to interact with the computer | GUI (windows, icons, menus) or CLI (commands) |
| Memory Management | Control RAM allocation and enable multitasking | Allocate, track, protect, and deallocate memory |
| Peripheral Management | Handle communication with external devices | Use drivers, manage interrupts, handle I/O |
| User Management | Control who can access the system and what they can do | Accounts, authentication, access rights, security |
| File Management | Organise and control access to stored data | Naming, folders, moving, saving, permissions |
Practice Activities
Test your understanding of operating systems: