IB Computer Science HL - Operating System Features

1. Do All Systems Require an Operating System?

Some systems can function without a full operating system, using built-in firmware instead.

  • Example: The Commodore 64 used built-in software but did not have a modern OS.

  • Embedded systems (e.g., ATMs, microwaves, digital cameras) often operate without a traditional OS, relying on firmware.

2. Resource Management by the Operating System

a) Primary Memory (RAM) Management

  • Allocates memory to active processes.

  • Handles paging and virtual memory (resolves page faults when necessary).

  • Frees up memory when processes no longer need it.

  • Protects the memory allocated to a process from other processes.

b) Secondary Storage (Persistent Storage) Management

  • Organizes files into a file system (e.g., FAT32, NTFS, ext4).

  • Creates, maintains, and manages the file system.

  • Manages file permissions (controls access to files).

  • Prevents accidental file deletion or overwriting.

  • Schedules disk access to optimize read/write operations.

c) Processor (CPU) Management

  • Handles multitasking by scheduling processes and allocating CPU time efficiently.

  • Uses process scheduling algorithms (e.g., Round-Robin, Shortest Job First).

  • Manages process states (New → Ready → Running → Waiting → Terminated).

  • Supports multithreading (running multiple tasks within one program).

  • Supports multiprocessing (using multiple CPU cores).

d) Bandwidth Management

  • Manages network bandwidth, prioritizing critical processes like video calls over background downloads.

e) Display & Graphics Management

  • Screen resolution & display settings: Configures display properties like resolution and refresh rate.

  • Provides drivers to allow sending commands to the graphics hardware without the developers having to prepare for different manufacturers and models. This way it hides the complexity of the actual way data and commands are sent to the hardware from the developer.

  • Graphics Processing Unit (GPU) management: Delegates rendering tasks to the GPU for efficient performance.

    • Note: The OS does not directly control the GPU’s computations; applications send instructions to the GPU.

f) Disk Storage Management

  • Same as secondary storage management.

g) Sound Processing

  • Manages audio input/output through drivers and APIs (e.g., DirectSound, ALSA).

  • Coordinates the sound card’s functionality with applications.

h) Cache Management

  • The OS does NOT manage CPU cache (L1, L2, L3) – this is handled by the processor.

  • However, disk caching in the control circuits of the disk drives may be monitored by the OS to speed up file access and make sure changes are committed.

i) Network Connectivity Management

  • Assigns unique addresses (IP/MAC) to devices for network communication.

  • Manages network protocols (e.g., TCP/IP) and security settings.

3. Data Loss When Removing a USB Stick

  • When copying a file from Disk 1 → RAM → Disk 2, the OS buffers (caches) data in RAM before writing it to the USB.

  • If the USB is removed before the write operation finishes, cached data is lost.

  • Solution: Use "Safely Remove Hardware" to ensure all cached data is written to the device.

4. User Interface (UI) Management

Types of User Interfaces Provided by the OS

  1. Graphical User Interface (GUI): Uses windows, icons, menus, and buttons (e.g., Windows, macOS).

  2. Command-Line Interface (CLI): Uses text-based commands (e.g., Linux Terminal, Command Prompt).

GUI Elements Managed by the OS

  • Toolbars – Provide quick access to common functions.

  • Menus

  • Dialogue boxes – Pop-up windows for user input (e.g., open file, print).

  • Preview window – Shows content before applying changes.

  • Buttons – Clickable elements for actions (e.g., OK, Cancel).

  • Multiple tabs – Organize interface elements efficiently.

  • Context menu (right-click menu) – Provides relevant options based on user interaction.

  • Radio buttons – Round buttons where only one option can be selected.

  • Checkboxes – Square boxes where multiple options can be selected.

Which Features Are Provided by the OS vs. the Application?

  • Operating System: Manages system-level dialogue boxes (e.g., "Open File," "Print").

  • Application Software: Provides application-specific menus, toolbars, and customization options.

5. Device Management (Drivers & Peripherals)

  • The OS manages hardware devices (e.g., keyboard, mouse, printer, camera, USB).

  • Uses device drivers (software that allows hardware to communicate with the OS).

  • Plug-and-Play (PnP) feature detects and installs new devices automatically.

  • Drivers

    • case of no driver

    • generic driver

    • specific driver provided by hardware manufacturer

    • acquisition/installation:

      • provided in the box

      • magazines

      • through the internet

      • possibility of refreshing

6. Security & Access Control

  • Protects user data and system resources through:

    • User authentication (passwords, biometrics, PIN codes).

    • File permissions (restricting read/write access).

    • Encryption (protecting sensitive data).

    • Firewall & antivirus management (preventing unauthorized access).

7. Virtual Memory Management

  • Uses paging and swapping to manage RAM shortages.

  • Virtual memory extends RAM by using part of the hard drive (swap file).

  • Prevents system crashes when RAM is full by offloading data to disk storage.

  • Page fault

  • Thrashing

8. Power Management & Energy Efficiency

  • Manages power consumption, especially in laptops and mobile devices.

  • Uses sleep mode, hibernation, and adaptive brightness to save energy.

  • Helps extend battery life by controlling CPU usage and screen brightness.

9. Error Detection & Handling

  • Detects hardware and software errors, preventing system failures.

  • Provides error messages and crash reports (e.g., Blue Screen of Death in Windows).

  • Logs system issues for troubleshooting (Event Viewer, syslog).

10. Application Software Supported by the OS

  • Word processors (e.g., Microsoft Word, Google Docs).

  • Spreadsheets (e.g., Excel, Google Sheets).

  • Database management systems (e.g., MySQL, Microsoft Access).

  • Email clients (e.g., Outlook, Gmail).

  • Web browsers (e.g., Chrome, Firefox).

  • Computer-Aided Design (CAD) software (e.g., AutoCAD, ArchiCAD, model railway design tools).

  • Graphics processing software (e.g., Photoshop, GIMP).

Summary of Key OS Features

Memory Management – Allocates and frees up RAM.
Processor Management – Schedules tasks and handles multitasking.
Storage Management – Organizes, maintains, and secures files.
Device Management – Controls input/output devices and drivers.
Security Features – Authentication, encryption, firewalls.
Power & Performance Management – Optimizes energy consumption.
Error Handling – Detects and resolves system errors.
User Interface – Provides GUI and CLI for user interaction.