Learning Objectives
By the end of this lesson, you will be able to:
- Explain why a computer system requires an Operating System (OS)
- Explain key management tasks carried out by the OS including memory, file, security, hardware, and process management
- Understand the need for typical Utility Software provided with an OS
- Explain the concept of Program Libraries and their benefits including Dynamic Link Libraries (DLLs)
- Differentiate between CLI and GUI interfaces
- Understand how the OS manages computer resources efficiently
Key Terms
Operating System (OS)
Software that manages computer hardware and provides services for application software
System Software
Software designed to control and work with computer hardware
Utility Software
System software that analyzes, configures, monitors, or helps maintain a computer
CLI (Command-line Interface)
Text-only user interface where users type commands to interact with the OS
GUI (Graphical User Interface)
Visual interface using icons, menus, and windows for user interaction
Memory Management
OS function that manages computer's main memory allocation and protection
Process Management
OS function that handles the execution of programs and allocation of resources
Device Driver
Software that enables OS to communicate with hardware devices
File Management
OS function that handles file creation, deletion, naming, and organization
Dynamic Link Library (DLL)
Library of code that can be used by multiple programs at runtime
Defragmentation
Process of reorganizing files on a disk to store them in contiguous sectors
Program Libraries
Collections of pre-written code and subroutines used in software development
Introduction to System Software & Operating Systems
What is System Software?
System Software is designed to control and work with computer hardware. It provides the foundation on which application software runs.
Types of System Software
- Operating System (OS): Set of programs that run in the background, providing an environment for application software to execute.
- Examples: Windows, macOS, Linux, Android, iOS
- Utility Software: Programs that analyze, configure, monitor, or help maintain a computer system.
Why Computers Need an OS
- Provides user interface and hides hardware complexity from users
- Controls overall working of computer system
- Manages all attached hardware devices efficiently
- Provides platform for other programs to run
- Controls how hardware devices work and communicate
- Hardware is unusable without an OS
Real-Life Example: The OS as a School Administrator
Think of an OS as a school administrator:
- User Interface: Like the school office/reception where students/parents interact
- Resource Management: Like allocating classrooms, teachers, and equipment efficiently
- Security: Like school security guards and ID card systems
- File Management: Like organizing student records in filing cabinets
- Hardware Management: Like maintaining computers, projectors, and other equipment
- Just as a school couldn't function without administrators, a computer can't function without an OS!
User Interface Comparison: CLI vs GUI
Command-line Interface (CLI)
Features: Text-only, requires command knowledge, faster for experts, less resource-intensive
Graphical User Interface (GUI)
Features: Visual interface with icons/menus, user-friendly, intuitive, uses mouse/touchscreen
Key Difference: CLI requires memorizing commands but is powerful for automation. GUI is easier for beginners but may be slower for complex tasks. Modern OSes usually provide both!
Check Your Understanding: System Software Basics
1. Why is an operating system essential for a computer? [3 marks]
Answer
- [1 mark] Provides user interface and hides hardware complexity from user
- [1 mark] Controls overall working of computer system and manages hardware devices
- [1 mark] Provides platform/environment on which other programs can run
- [Additional] Hardware is unusable without an OS - it acts as intermediary between user and hardware
2. What are the two main types of user interfaces provided by an OS? [2 marks]
Answer
- [1 mark] Command-line Interface (CLI) - text-only interface requiring command knowledge
- [1 mark] Graphical User Interface (GUI) - visual interface with icons, menus, and windows
- [Additional] CLI is faster for experts, GUI is more user-friendly for beginners
3. What is the difference between system software and application software? [2 marks]
Answer
- [1 mark] System software controls and works with computer hardware (OS, utilities)
- [1 mark] Application software performs specific tasks for users (word processors, games, browsers)
- [Additional] System software provides the platform on which application software runs
OS Management Tasks
The operating system performs several key management tasks to ensure the computer operates efficiently and securely. These tasks work together to provide a stable environment for applications and users.
1. Memory Management
Memory management handles the computer's main memory (RAM). It ensures programs have enough memory to run and don't interfere with each other.
Memory Protection
Prevents applications from using the same memory locations simultaneously. Without this:
- Data could be lost or corrupted
- Applications could produce incorrect results
- Security issues could arise
- Computer could crash
Memory Organization
Schemes to achieve optimum usage of limited memory:
- Single (contiguous) allocation: All memory available to one application
- Partitioned allocation: Memory split into contiguous partitions
- Paged memory: Fixed-size partitions (used in virtual memory)
Memory Usage Optimization
Determines how memory is allocated and deallocated when multiple applications run simultaneously. Involves decisions about:
- Which processes should be in main memory
- Where they are stored in memory
- When to move data between RAM and disk (virtual memory)
Memory Management Visualization
This simulation shows how an OS manages memory allocation between different programs:
How it works: The OS keeps track of which memory segments are free or allocated. When a program needs memory, the OS finds a suitable free block. Memory protection ensures Program A cannot access Program B's memory space.
2. Security Management
Ensures integrity, confidentiality, and availability of data and system resources.
Security Measures
- Carrying out OS updates when available
- Keeping antivirus software up-to-date
- Communicating with firewalls to check network traffic
- Using privileges to prevent unauthorized access
- Maintaining access rights for all users
- Offering data recovery (system restore) capabilities
- Preventing illegal intrusion to computer system
Real-Life Security Example
Think of OS security like school security:
- Updates: Like repairing broken fences
- Antivirus: Like health screenings for students
- Firewall: Like school gates checking who enters
- Privileges: Like teacher-only areas
- Access Rights: Like different keys for different rooms
- Data Recovery: Like having backup lesson plans
3. Process Management
A process is a program being run on a computer. Process management involves allocation of resources and permits sharing/exchange of data.
Process Creation
OS loads program into memory and creates process control block
Resource Allocation
OS allocates CPU time, memory, and I/O devices to the process
Scheduling
OS decides which process runs when (using scheduling algorithms)
Synchronization
OS coordinates processes to prevent conflicts when sharing resources
Termination
OS releases all resources when process completes or is terminated
4. Hardware Management
Manages all input and output peripheral devices using device drivers.
Example: Printing a Document
Locate Driver
OS locates and loads printer driver into memory
Send to Buffer
Sends data to printer buffer ready for printing
Queue Management
If printer busy, sends data to printer queue first
Control Commands
Sends control commands to printer throughout process
Handle Errors
Receives and handles error messages/interrupts from printer
5. File Management
Handles file organization, naming, storage, and access control.
Main Tasks of File Management
- Defining file naming conventions (e.g., filename.docx, filename.pdf)
- Performing specific tasks: create, open, close, delete, rename, copy, move
- Maintaining directory structures (folders and subfolders)
- Ensuring access control mechanisms (passwords, access rights)
- Specifying logical file storage format (FAT, NTFS, etc.)
- Ensuring memory allocation for files when loaded from storage
File System Example
Activity 1: OS Management Tasks Matching
Match each OS management task with its correct description:
- Memory Management -
- Security Management -
- Process Management -
- Hardware Management -
- File Management -
Solution:
- Memory Management - a) Prevents applications from using same memory locations
- Security Management - b) Ensures integrity and confidentiality of data
- Process Management - b) Allocates CPU time and resources to programs
- Hardware Management - b) Communicates with devices using drivers
- File Management - b) Handles file creation, deletion, and organization
Check Your Understanding: OS Management Tasks
1. What is memory protection and why is it important? [3 marks]
Answer
- [1 mark] Memory protection ensures that two competing applications cannot use the same memory locations at the same time
- [1 mark] Prevents data loss, incorrect results, security issues, and system crashes
- [1 mark] Essential for maintaining system stability and security when multiple programs run simultaneously
2. Describe three security measures implemented by an OS. [3 marks]
Answer
- [1 mark] Carrying out OS updates when available
- [1 mark] Ensuring antivirus software is always up-to-date
- [1 mark] Communicating with firewalls to check all network traffic
- [Additional] Other measures: Using privileges to prevent unauthorized access, maintaining access rights, offering data recovery, preventing illegal intrusion
3. What is the role of device drivers in hardware management? [2 marks]
Answer
- [1 mark] Device drivers enable communication between the OS and hardware devices
- [1 mark] They translate data from OS file format into a format that input/output devices can understand
- [Additional] Examples: printer drivers, display drivers, network adapter drivers
4. List four main tasks of file management. [4 marks]
Answer
- [1 mark] Defining file naming conventions (e.g., filename.docx)
- [1 mark] Performing specific tasks: create, open, close, delete, rename, copy, move
- [1 mark] Maintaining directory structures (folders/subfolders)
- [1 mark] Ensuring access control mechanisms (passwords, access rights)
- [Additional] Also: Specifying file storage format (FAT/NTFS), allocating memory for files
5. What is process management and what does it involve? [3 marks]
Answer
- [1 mark] Process management handles programs being run on a computer (processes)
- [1 mark] Involves allocation of resources (CPU time, memory, I/O devices)
- [1 mark] Permits sharing and exchange of data between processes
- [Additional] Also involves scheduling processes and resolving conflicts when processes require same resource
Utility Software
Utility software is system software designed to analyze, configure, optimize, or maintain a computer. It might be provided by the OS or installed separately. Some utilities run in the background automatically (like virus checkers), while others are initiated by users.
Types of Utility Software
Hard Disk Formatter
Performs these tasks:
- Removes existing data from a disk
- Sets up file system based on table of contents
- Partitions disk into logical drives if required
Hard Drive Checker
Performs disk contents analysis and repair:
- Checks for errors on disk
- Identifies 'bad sectors' (damaged areas)
- Marks bad sectors so file system doesn't use them
- Attempts to recover data from affected files
Disk Defragmenter
How Fragmentation Occurs
When files are constantly created, edited, and deleted, they become fragmented (stored in non-contiguous sectors). This makes file access slower.
| Sectors 0-3 | Sector 4 | Sectors 5-7 | Sectors 8-9 | |
|---|---|---|---|---|
| Initial position | File A | File B | File C | Empty |
| File B deleted | File A | Empty | File C | Empty |
| File A extended | File A | Empty | File C | File A (continued) |
Defragmenter solution: Reorganizes file storage so all files are stored in contiguous sectors, improving access speed.
Backup Software
Provides safer and more reliable data backup:
- Establishes a schedule for automatic backups
- Only creates new backup files when changes occur
- Stores backed-up data on external media (USB, cloud)
File Compression
Minimizes storage requirements and transmission size:
- Reduces hard disk space needed for files
- Important for transmitting data over networks
- Used before attaching files to emails
Virus Checker
Protects computer systems from malware:
- Keeps constant check on files for viruses
- Deletes or quarantines infected files if found
- Scans files being transferred between computers
- Often runs automatically in the background
Real-Life Example: Maintaining Your Digital Home
Think of utility software as home maintenance tools:
- Disk Formatter: Like preparing a new room for use (painting, flooring)
- Defragmenter: Like organizing a messy closet so everything is easy to find
- Disk Checker: Like a home inspector checking for structural problems
- Backup Software: Like keeping important documents in a fireproof safe
- Virus Checker: Like a security system protecting your home from intruders
- File Compression: Like vacuum storage bags to save space in your closet
Activity 2: Utility Software Scenarios
For each scenario below, identify which utility software would be most appropriate:
- Your computer is running very slowly when opening files. Analysis shows files are scattered across the disk.
- You need to send 50 high-resolution photos via email, but the attachment size limit is 25MB.
- You've just bought a new external hard drive and need to prepare it for use with your Windows computer.
- Your computer keeps crashing unexpectedly, and you suspect some system files might be corrupted.
- You want to ensure you don't lose your important documents if your computer fails.
- You downloaded a file from the internet and want to check if it contains malware.
Solution:
- Disk Defragmenter - reorganizes files into contiguous sectors to improve access speed
- File Compression - reduces file sizes to meet attachment limits
- Disk Formatter - prepares new storage media for use with a specific file system
- Disk Checker/Repair - identifies and fixes disk errors and corrupted files
- Backup Software - creates copies of important files for recovery purposes
- Virus Checker - scans files for malware and potential threats
Check Your Understanding: Utility Software
1. What is disk defragmentation and why is it necessary? [3 marks]
Answer
- [1 mark] Disk defragmentation reorganizes file storage so files are stored in contiguous sectors
- [1 mark] Necessary because constant file creation, editing, and deletion causes fragmentation
- [1 mark] Fragmented files are stored in non-contiguous sectors, making access slower
- [Additional] Defragmentation improves disk efficiency and file access speed
2. What are the causes of bad sectors on a hard disk? [4 marks]
Answer
- [1 mark] Improper shutdown of the operating system
- [1 mark] Physical defects of hard disk (surface wear, pollution inside unit, head touching surface)
- [1 mark] Poor quality hardware (bad processor fan, overheated hard drive)
- [1 mark] Malware infection
3. How does backup software help protect data? [2 marks]
Answer
- [1 mark] Establishes a schedule for automatic backups, ensuring regular protection
- [1 mark] Only creates new backup files when there has been a change, saving time and space
- [Additional] Provides a safer and more reliable approach to data protection than manual backups
4. Why is file compression important? Give two examples. [3 marks]
Answer
- [1 mark] Minimizes hard disk storage requirements, saving space
- [1 mark] Important when transmitting data over networks or internet
- [1 mark] Used to compress files before attaching them to emails
- [Additional] Examples: Creating ZIP files for multiple documents, compressing images for web upload
5. What tasks does a hard disk formatter perform? [3 marks]
Answer
- [1 mark] Removes existing data from a disk
- [1 mark] Sets up file system on hard disk based on a table of contents
- [1 mark] Partitions disk into logical drives if required
- [Additional] Prepares storage media for use with a specific operating system
Program Libraries
Program Libraries are collections of resources used to develop software, including pre-written code and subroutines. They save development time by allowing programmers to reuse existing code rather than writing everything from scratch.
What are Program Libraries?
Uses of Program Libraries
- When software is under development, programmers can use pre-written subroutines
- Saves considerable development time
- Helps developers use Dynamic Link Library (DLL) subroutines in their programs
- Library routines must be available at run time for DLLs
Dynamic Link Libraries (DLL)
In DLLs, software being developed is not linked to library routines until actual run time:
- Library routines are stand-alone files
- Accessed as required by the new program
- Available to several applications simultaneously
- Easier to update modules without affecting entire program
DLL vs Static Library Visualization
Payroll Program
Main executable
TaxRates.dll
Tax calculation routines
Example: When tax rates change, only TaxRates.dll needs updating, not the entire payroll program
| Pros of using DLL files | Cons of using DLL files |
|---|---|
| Executable code is smaller since DLLs are only loaded at run time | Executable is not self-contained - all DLLs must be available at run time |
| Changes to DLLs can be made independently without recompiling main program | DLL linking software must be available at run time |
| DLLs can be shared by multiple applications simultaneously | Changed DLLs (intentionally or through corruption) can cause unexpected results or crashes |
| Saves memory and execution time | Malicious changes to DLLs present security risks |
Static Libraries
How Static Libraries Work
With static libraries, software being developed is linked to executable code in the library at compilation time:
- Library routines are embedded directly into the new program code
- Creates a self-contained executable file
- No external dependencies at run time
- Program size is larger since library code is included
- Updates require recompiling the entire program
Real-Life Example: Building with LEGO vs Pre-built Modules
Think of program libraries like construction methods:
- Writing code from scratch: Like making bricks from raw clay - time-consuming!
- Using static libraries: Like using standard LEGO bricks - they become part of your creation
- Using DLLs: Like using pre-built LEGO modules (wheels, windows) that can be shared between models
- DLL advantage: If LEGO improves the wheel design, all models using it get better automatically
- Static advantage: Your creation works even if LEGO stops making certain parts
Activity 3: DLL vs Static Libraries
For each scenario, decide whether a DLL or static library would be more appropriate:
- A tax calculation program where tax rates change every year.
- A small utility program that needs to run on computers without internet access.
- A graphics program that uses common image processing functions shared with other graphics applications.
- A security-critical application where stability is more important than easy updates.
- A software suite where multiple programs need to use the same printing routines.
- A mobile app with limited storage space on the device.
Solution:
- DLL - Tax rates change frequently, so easy updates without recompiling entire program
- Static library - Self-contained executable that doesn't depend on external files
- DLL - Shared functions used by multiple applications save memory
- Static library - More stable and secure without external dependencies
- DLL - Multiple programs can share the same printing routines
- DLL - Smaller executable size saves storage space (DLLs loaded only when needed)
Check Your Understanding: Program Libraries
1. What are program libraries and how do they benefit developers? [3 marks]
Answer
- [1 mark] Program libraries are collections of resources including pre-written code and subroutines
- [1 mark] Software under development can be constructed using existing code from libraries
- [1 mark] Saves considerable development time by reusing tested code rather than writing from scratch
- [Additional] Examples include built-in functions and Dynamic Link Libraries (DLLs)
2. What is a DLL and how does it differ from static libraries? [4 marks]
Answer
- [1 mark] DLL = Dynamic Link Library - library routines linked at run time, not compilation
- [1 mark] Static libraries embed code into program at compilation; DLLs remain separate files
- [1 mark] DLLs can be shared by multiple applications; static libraries are program-specific
- [1 mark] DLLs are easier to update without recompiling main program
3. What is the main advantage of using DLL files? [2 marks]
Answer
- [1 mark] Updates are easier to apply to each module without affecting other parts of program
- [1 mark] Example: Tax rates in payroll program can be updated by changing DLL without rebuilding entire program
- [Additional] Also saves memory since DLLs are shared between applications
4. What are two disadvantages of using DLL files? [2 marks]
Answer
- [1 mark] Executable code is not self-contained - all DLL files need to be available at run time
- [1 mark] If DLL files are changed (intentionally or through corruption), it could lead to unexpected results or crashes
- [Additional] Missing DLL errors occur if required libraries aren't present; security risks from malicious DLL changes
5. How do static libraries work? [2 marks]
Answer
- [1 mark] Software being developed is linked to executable code in library at time of compilation
- [1 mark] Library routines are embedded directly into new program code
- [Additional] Creates self-contained executable that doesn't depend on external files at run time
Key Takeaways
- Operating System (OS) is essential software that manages computer hardware and provides platform for applications
- System software controls computer hardware; includes OS and utility software
- User interfaces include CLI (command-line) for experts and GUI (graphical) for ease of use
- Memory management protects applications from interfering with each other's memory space
- Security management ensures data integrity, confidentiality, and availability through updates, antivirus, firewalls
- Process management allocates resources and handles program execution
- Hardware management uses device drivers to communicate with peripherals
- File management handles file organization, naming, storage, and access control
- Utility software maintains and optimizes computer (formatters, defragmenters, virus checkers, backup tools)
- Disk defragmentation reorganizes files into contiguous sectors to improve access speed
- Program libraries provide pre-written code to save development time
- Dynamic Link Libraries (DLLs) allow code sharing between applications and easier updates
- Static libraries embed code into programs at compilation, creating self-contained executables
- OS and utility software depend on each other to function properly
- Without an OS, computer hardware is unusable by ordinary users
Question Bank
1. Explain why a computer system requires an operating system. [4 marks]
Marking Scheme & Answer
- [1 mark] Provides user interface and hides complexity of hardware from user
- [1 mark] Controls overall working of computer system
- [1 mark] Controls all attached hardware devices and efficiently uses computer resources
- [1 mark] Provides platform/environment on which other programs can run
- [Additional] Hardware is unusable without an OS; controls how hardware devices work and communicate
2. Describe the key differences between CLI and GUI. [4 marks]
Marking Scheme & Answer
- [1 mark] CLI is text-only with feedback appearing as text; GUI uses icons, tiles, and menus
- [1 mark] CLI requires knowledge of commands; GUI is more intuitive using mouse/touchscreen
- [1 mark] CLI is faster for experts and automation; GUI is easier for beginners
- [1 mark] CLI uses less system resources; GUI requires more graphical processing power
- [Additional] Modern OSes often provide both interfaces for different user needs
3. What is memory protection and why is it important in an OS? [3 marks]
Marking Scheme & Answer
- [1 mark] Memory protection ensures that two competing applications cannot use the same memory locations at the same time
- [1 mark] Prevents data loss, incorrect results, security issues, and system crashes
- [1 mark] Essential for maintaining system stability when multiple programs run simultaneously
- [Additional] Part of memory management function of OS; uses techniques like paging and segmentation
4. Explain how an OS manages hardware devices. [4 marks]
Marking Scheme & Answer
- [1 mark] Communicates with all input/output devices using device drivers
- [1 mark] Translates data from OS format into format that devices understand using drivers
- [1 mark] Ensures each hardware resource has priority for use and release as required
- [1 mark] Manages queues and buffers for device communication (e.g., printer queue)
- [Additional] Example: Printing involves loading driver, sending to buffer/queue, control commands, error handling
5. What are the main tasks of file management in an OS? [5 marks]
Marking Scheme & Answer
- [1 mark] Defining file naming conventions (e.g., filename.docx, filename.pdf)
- [1 mark] Performing specific tasks: create, open, close, delete, rename, copy, move
- [1 mark] Maintaining directory structures (folders and subfolders)
- [1 mark] Ensuring access control mechanisms (passwords, access rights)
- [1 mark] Specifying logical file storage format (FAT, NTFS, etc.)
- [Additional] Also ensures memory allocation for files when loaded from storage
6. Describe three different utility programs and their purposes. [6 marks]
Marking Scheme & Answer
- [2 marks] Hard Disk Defragmenter: Reorganizes file storage so files are stored in contiguous sectors, improving access speed when fragmentation occurs from constant file creation/editing/deletion
- [2 marks] Virus Checker: Protects computer system by constantly checking files for viruses, deleting infected files, and scanning files transferred between computers
- [2 marks] Backup Software: Provides safer data protection by establishing backup schedules and only creating new backups when changes occur, storing data on external media
- [Additional] Other utilities: Disk formatter (prepares storage media), disk checker (repairs errors), file compression (reduces file sizes)
7. What are program libraries and how do DLLs differ from static libraries? [5 marks]
Marking Scheme & Answer
- [1 mark] Program libraries are collections of pre-written code and subroutines used in software development
- [1 mark] Save development time by allowing reuse of existing code rather than writing from scratch
- [1 mark] DLLs (Dynamic Link Libraries) link to programs at run time; static libraries embed code at compilation
- [1 mark] DLLs can be shared by multiple applications; static libraries create self-contained executables
- [1 mark] DLLs are easier to update without recompiling; static libraries require full recompilation for updates
8. Explain the advantages and disadvantages of using DLL files. [6 marks]
Marking Scheme & Answer
Advantages:
- [1 mark] Executable code is smaller since DLLs load at run time
- [1 mark] Changes to DLLs can be made independently without recompiling main program
- [1 mark] DLLs can be shared by multiple applications simultaneously
Disadvantages:
- [1 mark] Executable not self-contained - all DLLs must be available at run time
- [1 mark] Changed DLLs can cause unexpected results or crashes
- [1 mark] Security risks from malicious DLL changes
Example: Payroll program with tax rates DLL - tax updates only require DLL change, not full recompile
9. How does disk fragmentation occur and how is it resolved? [4 marks]
Marking Scheme & Answer
- [1 mark] Fragmentation occurs from constant file creation, editing, and deletion
- [1 mark] Files become stored in non-contiguous sectors when extended into free spaces left by deleted files
- [1 mark] Example: File A extended after File B deleted - part stored in original location, part in new location
- [1 mark] Resolved by defragmenter utility that reorganizes files into contiguous sectors
- [Additional] Fragmentation slows file access; defragmentation improves disk efficiency
10. Explain the relationship between OS and utility software. [3 marks]
Marking Scheme & Answer
- [1 mark] Operating system and utility software typically depend on each other to function properly
- [1 mark] Utility software might be provided by the OS or installed as separate entities
- [1 mark] Some utilities run in background automatically (e.g., virus checkers); others are user-initiated
- [Additional] Utilities extend OS functionality for maintenance, optimization, and security tasks