Paging - memory split up into equal sized pages which can be switched between main memory and hard drive when needed
Segmentation is splitting up of memory into logical sized divisions which vary in size
Virtual Memory is using secondary storage as if it was RAM. Programs which aren't in use can be moved into secondary storage and moved back once needed in order to free up space in RAM
Diskthrashing - an issue with these where the computer freezes as a result of pages being swapped too frequently between the hard disk and memory
ResourceManagement - Scheduling
Core function of the OS is to ensure all jobs being performed are to receive a fair amount of processing time
User Interface - The way in which the computer and user interact.
Interrupt - a signal sent to a CPU to signify another process is in need of processing time
ISRInterruptServiceRoutine
The program code that is called when an interrupt is triggered.
Each interrupt has a specific ISR associated with it.
Relevant ISR is loaded and carries out actions required
Scheduling - The method an operating system uses to ensure all processes get sufficient processing time.
RoundRobin:
each process is given a fixedamount of time. (time slice)
If it hasn't finished by the end of that time period, it goes to the back of the queue so the next process in line can have its turn
longer jobs will take much longer to complete due to execution being inefficiently split up into multiple cycles
doesn't take job priority into account
First come first serve (FCFS) -
like queuing in a shop
the first process to arrive is dealt with by the CPU until it is finished. Meanwhile, any other processes that come along are queued up waiting for their turn.
jobs processed in chronological order
straightforward to implement
doesn't take job priority into account
Shortest job first (non-preemptive)
picks the job that will take the least amount of time to complete.
Normally the algorithm will need to know the time each job will take in advance but this is not always possible
suited to batch systems - where shorter jobs are given preference in order to minimise waiting time
risk of processorstarvation where a particular process does not receive enough processor time in order to be executed and completed
Shortest remaining time (pre-emptive)
scheduler estimates how long each process will take.
picks one that takes least amount of time to complete
also a risk of processor starvation for longer jobs if short jobs are added to the job queue
Pre-emptive - The scheduling in which a running process can be interrupted if a high priority process enters the queue and is allocated to the CPU
Multilevelfeedbackqueues -
uses a number of queues
each queue has different priority
algorithm can move jobs between these queues
Distributed Operating System
run across multiple devices, allowing the load to be spread across multiple computers when a task is run
The workload can be shared across a collection of computers using a distributed OS
EmbeddedOS
Built to perform a small range of specific tasks, catered towards a specific device.
An embedded system is a computer that forms part of a device such as a washing machine or vending machine, coffee machine
limited in their functionality
hard to update although they consume significantly less power than any other OS type
Multitasking Operating System
allows user to carry out tasks simultaneously
this is done by time slicing to switch quickly between applications and programs in memory
e.g Windows, Linux, MacOS
Modern day operating systems
Multi-user operating system:
Allows multiple users to use a system and its resources simultaneously
Used on larger and more powerful mainframe computers able to service large numbers of users at one time (supercomputers)
scheduling algorithm must be used to ensure processor time is shared fairly between jobs
e.g banks and retailers - able to process large number of transactions while being accessed by employees and customers.
Real-time operating system
Designed to carry out actions within a guaranteed time frame even when left running for long periods
used in time-critical computer systems, crucial for safety
Usually expected response time is within a small fraction of a second
e.g plane
Device Driver
A piece of software that tells the operatingsystem how it can communicate with hardware.
Used so devices with different models and manufacturers are able to communicate with one another
VirtualMachine
A program that has the same functionality as, and can be used in place of, a physicalmachine
used to create a development environment for programmers so they can test program on different operating systems
saves time and money of having to purchase multiple devices solely for testing
however running intermediate code in a virtual machine can also be considerably slower compared to the real thing
Virtual Memory
allocated area of secondary storage where pages of inactive jobs are swapped between VM and RAM to free up space in RAM
Interrupt Management
stored in order of priority
stored in a priority queue
in a special register called the 'interrupt register'
Interrupt Service Routine
The processor checks the contents of the interrupt register at the end of each FDE cycle.
If an interrupt exists with a higher priority than the process currently being executed, the current contents of the SP registers are temporarily transferred into a stack
The processor then loads the appropriate ISR into RAM (every interrupt has a different ISR)
A flag is then set to signal the ISR beginning
Non pre-emptive Scheduling Algorithms:
once a job is started, it is left alone until it is completed
examples: first come first served, shortest job first
Pre-emptive Scheduling Algorithms:
jobs are actively made to start and stop by the OS
examples: multilevel feedback queues, shortest remaining time, round robin
Basic Input Output System (BIOS):
the first program that runs when a computer system is switched on
PC points to the location of the BIOS each start-up
Responsible for:
POST (Power-on self test): ensures all hardware are correctly connected and functional
Checking CPU clock, memory, processor is operational
Testing for external memory devices connected to the computer
Uses of Virtual Machines:
Protection from malware:
malware will affect the virtual machine rather than the device being used
Running incompatible software
programs specific to different OS can be run with a VM which saves time and money
common example is game consoles being implemented on PCs via a virtual machine