Operating Systems
A collection of programs that work together to provide an interface between the user and computer
What features do operating systems provide?
Memory management
Resource management
File management
Input/output management
Interrupt management
What is paging?
When memory is split up into equal-sized sections known as pages
What is segmentation?
Splitting up memory into logical sized divisions, known as segments, which vary in size
Virtual memory
A section of the hard drive acting as RAM when space in main memory is insufficient
What is stored in virtual memory?
Sections of programs that aren't currently in use. Moved through paging
Issue with virtual memory
Disk thrashing - computer freezes as a result of pages being swapped too frequently between hard disk and main memory
Interrupts
Signals generated by software or hardware to indicate to the processor that a process needs attention
Interrupt service routine
CPU checks the contents of the interrupt register at the end of each fetch-execute cycle. If there is an interrupt of a higher priority than the current process, the contents of the registers are temporarily copied to a stack and the CPU carries out the interrupt. The interrupt queue is checked for further interrupts before the contents of the stack are popped back into the registers.
Scheduling
Ensures all sections of programs being run receive a fair amount of processing time
Pre-emptive scheduling
Jobs are actively made to start and stop by the operating system
Non pre-emptive scheduling
Once a job is started, it is left alone until it is completed
Round robin
Each job is given a section of processor time (time slice). Once each job in the queue has used its first time slice, the operating system grants each job an equal slice of processor time. This continues until a job has been completed, at which point it is removed from the queue
First come first served
Jobs are processed in chronological order by which they entered the queue
Multilevel feedback queues
Makes use of multiple queues, each of which are ordered based on a different priority
Shortest job first
The queue storing jobs to be processed is ordered according to the time required for completion, with the longest jobs being serviced at the end
Shortest remaining time
The queue storing jobs to be processed is ordered according to the time left for completion, with the jobs with the least time to completion being serviced first
Distributed operating system
OS that runs across multiple devices, allowing the load to be spread across multiple computer processors when a task is run
Embedded operating system
Built to perform a small range of specific tasks, and catered towards a specific device
Multi-tasking operating system
Enable the user to carry out tasks seemingly simultaneously by using time slicing to switch quickly between programs and applications in memory
Multi-user operating system
Multiple users make use of one computer, typically a supercomputer, within a multi-user system
Real time operating system
Designed to perform a task within a guaranteed time frame
BIOS
Basic Input Output System. The first program that runs when a computer system is switched on
BIOS responsibilites
POST (power-on self test) ensures all hardware works correctly Checking the CPU clock, memory and processor is functional Testing for external memory devices connected to the computer
Device drivers
Computer programs provided by the operating system and allow it to interact with the hardware
Virtual machines
A theoretical computer in that it is a software implementation of a computer system. Provides an environment with a translator for immediate code to run
Intermediate code
Code that is halfway between machine code and object code. Independent of the processor architecture so can be used across different machines and operating systems
Uses of virtual machines
Testing programs on different operating systems
Protection from malware
Running incompatible software