Systems Software
Operating Systems
An operating system is system software used to manage a device. It is device specific - designed for and built into the device. Operating systems have a variety of functions: they manage hardware and peripheral devices, manage CPU usage, provide security and provide utilities for system maintenance.
Memory Management
Memory Management divides memory either by paging or segmentation. Paging divides memory by fixed size physical divisions. Whilst all pages are the same size, what that size is can vary. Segmentation is dividing memory according to variable size logical divisions.
- It manages virtual addressing. This means that programs or data can be held in non-contiguous (not next to each other) memory locations.. This makes the best use of remaining storage as otherwise you would have to move content around to fit in new programs / data.
- It manages virtual memory. Virtual memory is where part of secondary storage is treated as extra memory space. It is used when physical memory space is limited. This means that pages can be transferred to and from secondary storage as if they were RAM. This ensures that there is no performance drop as there would be with secondary storage.
Scheduling
CPU time is allocated to processing using scheduling. Schedulers use different algorithms. When CPU attention is needed interrupts are generated. Interrupts are signals sent to the processor asking for attention.
Interrupt Service Routines - How are they handled?
The Fetch Decode Execute cycle is really the Fetch Decode Execute, Check for Interrupts cycle. Interrupts are urgent tasks that should happen almost immediately. For example when you end a task in Task Manager or power down your device. Interrupts can be less drastic. Inputs from mouse and keyboards, for example, are also interrupts,
When are interrupt is received:
- Current register values are pushed on to the stack.
- The interrupt is processed.
- The stack values are popped off and put back into the registers.
You can also interrupt an interrupt! If the most recent interrupt is more important the current interrupt is pushed onto the stack. It can then be popped off and executed before the original process is popped off and executed.
Scheduling Algorithms
Scheduling algorithms include Round Robin (Each job gets a fixed time slice), First Come First Served (The first job to arrive is processed until completion, then the next…), Shortest Job First (The quickest to complete job is finished first), Shortest Remaining Time (quickest job is completed first but stops and re-evaluates when a new job arrives), Multi-Level Feedback Queue (Jobs are put in different queues depending on their importance).
Types of Operating System
- Embedded - think Internet of Things - processors are embedded into all sorts of everyday devices such as microwaves, washing machines, TVs, traffic lights. Embedded operating systems are designed to efficiently carry out specific tasks on the specific hardware. They often use low powered processors and very little memory, so they require efficient coding.
- Multi-Tasking - since we often use many programs at the same time. Each active program is scheduled to receive a tiny time slice in quick rotation.
- Multi-User - more than one person can use a computer at the same time. The operating system will handle permissions, access rights for each login. Server operating systems will also handle multiple requests from multiple users at the same time.
- Real Time - these must be guaranteed to run in a known time frame for safety critical systems e.g. aircraft, defense, hospital monitoring. They do not operate at full capacity, instead they have redundancy built in.
- Distributed - this is the ability to use the processing power of multiple computers for a single task. The operating system coordinates and controls this to give the impression that one processor is being used.
BIOS
BIOS stands for Basic Input Output System. It is responsible for loading the operating system when you turn your computer on. It controls the hardware and software and provides a user interface.
It performs a Power On Self Test (POST) to ensure that required hardware is connected and working.
BIOS can be configured e.g. you can tell it which drives to check first for the operating system.
A boot loader program called a BOOTSTRAP is used to load the operating system kernel (its core).
It is unlikely but if BIOS was somehow overwritten the computer would not be able to boot or load the operating system. It would not be able to set up its initial configuration or perform any hardware checks. So the computer would be unusable.
Device Drivers
A device driver is tells the operating system how to communicate with a device. You need device drivers for any peripheral device plugged into your computer: webcams, printers, sound cards, graphics cards. For example if you want to print a document the driver will try to ensure that the document looks the same regardless of the printer.
Virtual Machines
A virtual machine is a piece of software that acts like an actual computer. VMs can be used to test out how software would run on different devices, which would save the time and space it takes to set them up. However, there would need to be some checks to ensure that the VM is accurately mimicking the device. Running over a VM can also be slower than using native code directly on the device.
Virtual machines could also be used when the device is not ready to be used e.g. the next version of a phone.
Virtual machines can also allow you to test out software which might damage the actual hardware. For example the performance of virus software.
Utility Software
Utility software is system software designed to support the maintenance and performance of your computer. Unlike application software it performs specific tasks such as analysis, allow you to configure various settings. It will also optimize or maintain your computer.
- Disk Defragmentation - to ogranise file segments in secondary storage
- Disk Checker - to scan the hard disk for corrupt areas or files and remove them.
- System clean up - to remove unwanted or temporary files.
- Anti-Virus/Malware
- Firewall
- File management
- Disk Drivers
- Encryption
- Compression - to reduce the size of files e.g. to store or send.
- Back Up