Features of an operating system
memory management, resource management, file management, input/output management, interrupt management, utility software, security, user interface
Memory Management
optimizes the use of the computer or device's internal memory
Paging
RAM is split up into equal sized sections made to fit the memory
benefits of paging and segmentation
allows for non-contiguous data storage
pages are assigned when needed program runs despite insufficient memory
What is a virtual machine?
Software based emulation of a computer system. It provides and environment with a translator for intermediate code to run.
Intermediate code
Code in between machine code and object code which is independent of the systems architecture
Use of intermediate code
able to be used across different machines and OS because it is independent of the processor architecture
An advantage of virtual machines is it can be configured ...
to create a specific environment needed for a specified task
An advantage of virtual machines is it makes ...
it possible to easily recover from failures.
An advantage of virtual machines is it saves…
time and money of having to purchase multiple devices for testing
Drawback of virtual machine
can be slower in comparison to running low level code on the device it was designed for
Uses of virtual machines
testing programs
protection from malware
running software that is incompatible with different types of os
operating system
software which controls a computers basic functions
how does the OS control communications
using protocols
how does the OS manage software
loading/ uploading software to memory
Why does memory need to be managed ?
memory is limited
segmentation
splits memory into variable sized logical divisions which can hold whole programs.
disk threshing
happened when more time is spent swapping pages from memory to the disk so the computer may ‘hang’
interrupt
a signal generated by software or hardware to indicate to the processor that a process need immediate attention
Stages of the interrupt service routine (abr)
Cancel Shane Dawson So Real Cuz
Stages of the interrupt service routine ( full )
cancel - complete the FDE cycle
Shane - save registers to memory
Dawson - determine interrupt service routine to run
so - service the interrupt
real - restore the register values
cuz - continue the original routine
what is an ISR ?
interrupt service routine is a program that responds to interrupt requests
why does interrupt only occur when the FDE is complete?
to ensure max efficiency of the processor
scheduling
manages the amount of time allocated to different processes in the CPU
purpose of scheduling ( maximising )
max out number of jobs
max out number of users receiving fast response with little delay
purpose of scheduling
jobs processed fairly, improve efficiency, prevent process starvation
round robin algorithm
jobs given equal amount time, if incomplete sent to the back of the queue.
adv of round robin
easy to implement, job sizes are small
disadv of round robin
doesn’t priorities important proccess
inefficient for longer jobs
if more processes are being run then the less frequent each process is allocated.
first come first serve (fcfs)
the processes are run in the order which they are allocated to the processor.
adv fcfs
easy to implement
avoids process starvation - once a job starts it will be completed
works well when there are only a few concurrent processes
disadv fcfs
doesn’t prioritise important tasks
long wait before processes can run
shortest job first
the process that needs the shortest amount of time goes first
disadv of shortest job first
process starvation happens when shorter jobs keep being added
doesn’t prioritise important tasks
long wait before processes can run
adv of shortest job first
ensures max number of jobs completed
minimises the average time taken to process task
shortest time remaining
jobs with the shortest time remaining are priorities over others.
difference between shortest time remaining and shortest job first
a long job which is mostly complete might have a short time remaining and would therefore be prioritise
multi level feedback queue
uses queues of tasks where each queue has a different level of priority
adv of multi level feedback queue
ensures higher priority processes run on time
disadv of multi level feedback queue
hard to implement
not efficient for jobs with similar priority
Distributed OS
coordinates communication between computers and makes it work as whole
use of Distributed OS
useful when single processor doesn’t have enough power
embedded OS
used in computers that have a specific purpose
multitasking OS
os switches between tasks quickly, looks like more than one task is running at a time
multi user OS
multiple users to a operate the same computer using terminals