(5) System Software
What is an operating System: An Operating System (OS) is a collection of system software that manages the computer's hardware and software resources, and provides services for application programs and users.
Why computers require an OS?
Reason | Explanation |
|---|---|
Abstraction | Hides hardware complexity from programmers |
Resource management | Shares CPU, memory, I/O fairly and efficiently |
User interface | Allows users to interact with the computer |
Program execution | Loads and runs application programs |
Security | Protects data and controls user access |
Error handling | Prevents crashes and provides error messages |
File management | Organises and stores data on secondary storage |
Interrupt handling | Responds to events from hardware and software |
Operating System Tasks:
Memory Management
memory optimisation
Determines how memory will be allocated or deallocated when applications are running
Also determine where they will be stored.
Keeps track of used and free memory.
Often swaps date from and to the HDD/SSD.
Memory Organisation
It determines how much of memory will be allocated to an application.
Single (contiguous) allocation; where all the memory will be allocated to the application.
Partitioned allocation; where memory will be divided into blocks of various sizes and allocated to applications.
Paged memory; similar to partitioned except the blocks are of equal sizes. Included virtual memory.
Segmented memory; where memory is not split up, but is logically splits the memory accordingly before allocating to apps.
memory protection
It ensures that competing applications do not use the same memory. Else it’ll lead to incorrect result, security issues or crashes.
File management
Defines the file
perform specific tasks
Ensure access control mechanisms.
Maintaining the directory structure
Ensuring memory allocation of the file by reading it from the HDD/SSD and loading it into the memory.
Security Management
It is ensuring confidentiality, accessibility and integrity
Hardware Management
communicating with all input and output devices using device drivers
translating data from a file (defined by the operating system) into a format that the input/output device can understand using device drivers.
ensuring each hardware resource has a priority so that it can be used and released as required.
Printer management:
• locates and loads the printer driver into memory
sends data to a printer buffer ready for printing
sends data to a printer queue (if the printer is busy or the print job has a low priority) before sending to the printer buffer
sends various control commands to the printer throughout the printing process
receives and handles error messages and interrupts from the printer.
Process Management
involves allocation of resources and allows sharing or exchanging of data which allows the processes to be synchronised.
The Need Of Utility Software-
hard disk formatter
Purpose | Prepares a hard disk for use by erasing all data and setting up a file system (e.g., NTFS, FAT32) |
When used | When a new disk is installed, or when a disk needs to be completely wiped |
What it does | Creates a file system structure (tracks, sectors, directories) so the OS can store and retrieve files |
virus checker
Purpose | Detects, prevents, and removes malicious software (viruses, worms, Trojans) |
When used | Continuously in the background, or on-demand scans |
What it does | Scans files and programs for known virus signatures (patterns), and monitors for suspicious behaviour |
defragmentation software
Purpose | Reorganises files on a magnetic hard disk so they are stored in contiguous blocks (not fragmented) |
When used | Periodically, when disk performance slows down |
What it does | Moves parts of files so each file is in one continuous block on the disk |
disk contents analysis/repair software
Purpose | Analyses the disk for errors and repairs problems with the file system or disk surface |
When used | When disk errors are detected, or periodically as maintenance |
What it does | - Scans for bad sectors (physical damage) |
file compression
Purpose | Reduces the size of files by removing redundant data (makes them take up less storage space) |
When used | When files need to be archived, sent via email, or downloaded |
What it does | - Uses algorithms to encode data more efficiently |
back-up software.
Purpose | Creates copies of files and data to protect against data loss (hardware failure, accidental deletion, corruption) |
When used | Scheduled regularly (daily, weekly, monthly) |
What it does | - Copies selected files to another location (external drive, cloud, network) |
Program libraries are used
when software is under development and the programmer can utilise pre-written subroutines in their own programs, thus saving considerable development time
to help a software developer who wishes to use dynamic link library (DLL) subroutines in their own program, so these subroutines must be available at run time.
Benefits of DLL:
the executable code of the main program is much smaller since DLL files are only loaded into memory at run time
it is possible to make changes to DLL files independently of the main program, consequently if any changes are made to the DLL files it will not be necessary to recompile the main program
DLL files can be made available to a number of applications at the same time
all of the above save memory and also save execution time
Cons of DLL:
the executable code is not self-contained, therefore all DLL files need to be available at run time otherwise error messages (such as missing .dll error) will be generated and the software may even crash
any DLL linking software in the main program needs to be available at run time to allow links with DLL files to be made
if any of the DLL files have been changed (either intentionally or through corruption) this could lead to the main program giving unexpected results or even crashing
malicious changes to DLL files could be due to the result of malware, thus presenting a risk to the main program following the linking process