Explain the differences between system and application software.
Understand the need for, and attributes of, different types of software.
Understand the need for, and functions of the following system software: operating systems (OSs), utility programs, utility programs, translators (compiler, assembler, interpreter).
Understand that a role of the operating system is to hide the complexities of the hardware.
Know that the OS handles resource management, managing hardware to allocate processors, memories and I/O devices among competing processes.
Lesson Notes
What is Software?
Software refers to a collection of programs and data that instruct a computer on how to perform specific tasks. The image below show software broken down into various categories.
Application Software
Application software, also known as app or software application, refers to a category of computer programs designed to perform specific tasks for end-users.
Application software enables users to create, edit, design, browse, communicate, and play with various applications. It can manipulate text, numbers, audio, graphics, or a combination of these elements. Examples include word processors, media players, and accounting software.
General Purpose
General purpose software is versatile and can be used for a variety of tasks. It is not limited to one specific function.
Examples:
Word Processors: These allow users to create documents, write novels, design restaurant menus, or even make posters.
Spreadsheet Software: Used for calculations, data analysis, and organizing information.
Presentation Software: Enables the creation of slideshows and visual presentations.
Bespoke
Bespoke software is tailor-made for a specific user or organization. It is customized to meet precise needs.
Advantages:
Precision - Meets specific requirements.
Disadvantages:
Cost - Development expenses can be high.
Time - This software can take a long time to create.
Examples:
Factory Automation: Software to run robots in car manufacturing, specifically designed for a unique factory.
Military Operations: Software for missile systems, UAVs, and specialized military equipment.
Financial Institutions: Custom software for banks, hospitals, and medical equipment.
Special Purpose
Special purpose software is designed for a specific task or function. It serves a singular purpose.
Examples:
Camera Applications on Phones: These apps allow users to take and share pictures.
Chess Games: Designed solely for playing chess.
Web Browsers, Calculators, and Media Players.
System Software
System software performs the tasks needed to operate the hardware.
System software refers to the low-level software that manages and controls a computer's hardware and provides basic services to higher-level software. It serves as the interface between the hardware and the end users, allowing users to interact with the hardware and use various applications and programs.
Here are examples of System Software:
Operating Systems (OS): These are foundational frameworks for all other software and applications to run on a computer. Examples include Windows, macOS, and Linux.
Device Drivers: These enable communication between the operating system and hardware devices like printers, scanners, and graphics cards.
Firmware: Pre-installed low-level software that controls a device's basic functions.
Utility Software: Tools for system maintenance and optimization.
Boot Loaders: Software that initializes the OS during startup.
Operating Systems
Operating systems act as interface between user and hardware. The operating system hides the complexity of the hardware from the user. Manages hardware and runs software and also:
Communicates with peripheral devices (input/output) using device drivers (software that translated OS and device language).
Provides a platform for application software to run on.
Controls memory management.
Organises the CPU and its tasks.
Manages security and user accounts.
Provides a interface for the users. There are 2 types: Command Line Interface (CLI), an interface that responds to text commands, and Graphical User Interface (GUI), an interface that provides icons, menus and other graphics the navigate though the system.
A-Level Question: How does the OS manage memory?
Below are a list of methods used by the operating system to manage the computers memeory:
Paging: Divides memory into fixed-size pages. Processes are allocated pages, and the OS maps logical addresses to physical addresses.
Segmentation: Divides memory into segments (e.g., code, data, stack). Each segment has a different size.
Virtual Memory: Allows processes to use more memory than physically available by swapping data between RAM and disk.
A-Level Question: What is the role of Interupts and Service Routines in the FE Cycle?
Interrupts: Signals generated by hardware or software to request CPU attention.
ISR (Interrupt Service Routine): A specific routine that handles interrupts. It runs when an interrupt occurs during the fetch-decode-execute cycle.
Purpose: To handle external events (e.g., I/O completion, hardware errors) without wasting CPU cycles.
A-Level Question: Why are Processor Scheduling Algorithms needed?
CPUs can execute only one process at a time. Scheduling ensures efficient resource utilization. The goal of these algorithms is to improve system efficiency, fairness, and responsiveness to processor tasks. Here are a list of Scheduling Algorithms:
First Come First Serve (FCFS): Processes are executed in the order they arrive. Simple and easy to implement. This algorithm ensures fairness as each process will get a turn. However it can result in poor performance if long processes arrive first (convoy effect).
Shortest Job First (SJF): Prioritizes processes with the shortest burst time. Optimal for minimizing waiting time. It is efficient for minimizing turnaround time. However, it requires knowledge of future burst times (not always available).
Round Robin (RR): Time-sliced scheduling. Each process gets a fixed time quantum. It provides equal time for all processes and is good for interactive systems. A disadvantage relates to its overheads which are due to context switching (not sure what this means...).
Multi-Level Feedback Queues: Uses multiple queues with different priorities. Processes move between queues based on behavior. This algorithm adapts to varying workloads, but requires careful tuning.
Shortest Remaining Time First (SRTF): Preemptive version of SJF. Chooses process with the shortest remaining burst. It minimizes waiting time. However, frequent preemption can impact performance.
Each algorithm has positives and negatives. The choice depends on system requirements and workload characteristics.
Library Programs
A library in computing refers to a collection of resources used during software development to implement computer programs. These resources can include:
Configuration data
Documentation
Help Data
Message Templates
Source code or pre-compiled functions and classes
Values or type specifications
Advantages:
Efficiency (saves time and effort).
Reliability (tested and optimized).
Reusability (used in different parts of projects).
Community support.
Disadvantages:
Dependency issues.
Compatibility challenges.
Overhead for small tasks.
Open Source Software
Open source software is computer software whose source code is available openly on the internet. Programmers can modify it to add new features and capabilities without any cost.
Free of cost: Users can obtain it without paying.
Source code availability: Allows users to study how the software works, modify it, and improve it.
No restrictions on redistribution: Users can freely share it.
Examples:
Linux Ubuntu
GNU Image Manipulation Program
Mozilla Firefox
Proprietary Software
Proprietary software is copyrighted and its source code is not publicly available. Only the company that created it can modify and distribute it. They are the legal owners of the software.
Restricted access: Users need an authenticated license to use it.
Controlled by a closed team: Managed by the company that developed it.
Restrictions: Imposes limits on installations, sharing, and features.
Examples:
Microsoft Office
iOS
Adobe Photoshop
Translators
Programming Language Translators
Computers can only run machine code. When you write a program in a second, third or fourth generation language then the program must be translated into machine language with either a Assembler or Compiler or Interpreter.
Assembler
An assembler is a program that translates an assembly language program into machine code.
Compiler
A compiler a the source code from a high level language and translates it into machine code. The resulting code will run much faster as it requires no translation at run time. Compilers turn high level code into one workable executable (exe) files.
Compilation is the process of translating high-level source code into machine code (object code) before execution.
The entire program is converted into machine code by a compiler. Compilation happens once, before execution. Compiled programs run faster than interpreted ones. Examples: C, C++, Rust.
Interpreter
An interpreter analyses and executes each line of code within a high level programming language. It does not look at any other part of the code except the line it is running. Execution is slower because the program is analysed line by line at runtime. The advantage is that the code runs immediately without having to wait for the code to be compiled. It is also clear to see which part of the code is being executed.
Interpretation involves executing the source code line-by-line using an interpreter. The interpreter reads and executes the code directly. Interpretation happens during runtime. Interpreted programs can be modified while running. Examples: Python, JavaScript, Ruby.
Bytecode?
Bytecode serves as an intermediate representation that allows cross-platform compatibility. Code written in bytecode can be executed on any machine with a compatible virtual machine or interpreter.
A-Level Question: Explain the stages of compilation: lexical analysis, syntax analysis, code generation and optimisation.
Lexical Analysis: Splits source code into lexemes (basic units).
Syntax Analysis (Parsing): Builds a syntax tree from tokens generated in the previous stage.
Semantic Analysis: Ensures code adheres to language rules and semantics.
Intermediate Code Generation: Produces an intermediate representation (e.g., three-address code).
Code Generation: Translates intermediate code into machine code.
Linkers
Ensures that programs can successfully interact with library functions by accurately assigning memory addresses for both calls to those functions and subsequent returns.
Links the compiled code with pre-defined libraries and system functions to create a final executable program.
Brings together all the necessary pieces for the program to run independently.
Loaders
Loaders copy programs and subroutines into main memory.
The loader will allocate a memory address the to the programs and subroutines that is being loaded.