1.2.1 system storage Flashcards
os, interrupt, scheduling, types of os, bios, device drivers, virtual machines
what does the operating system refer to?
a collection of programs that work together to provide an interface between the user and computer
what do operating systems allow the user to do?
communicate with the computer and perform certain low level tasks involving the management of computer memory and resources
what does os provide?
memory management
scheduling
file management
i/o management
interrupt management
utility software
security
user interface
what roles do memory management in the os include?
paging, segmentation and virtual memory
what is paging?
when memory is split up into equal sized sections called pages
how does paging work?
programs are being made up of a certain number of equally sized pages they can be swapped between main memory and the hard disk as needed
what is segmentation?
splitting up of memory into logical sized divisions called segments which vary in size
what is the key issue with vm?
disk thrashing
what is disk thrashing?
the computer freezes because of pages being swapped too frequently between hard disk and main memory
what are interrupts?
signals generated by software or hardware to indicate to the processor that a process needs attention
how are interrupts stored?
in order of priority within an abstract data called a priority queue in the interrupt register
when does the CPU check the contents of the interrupt register?
at the end of FDE
what is the ISR?
- if an interrupt in the interrupt register has a higher priority of the process being executed, the contents of the special purpose registers are temporarily transferred into a stack
- the CPU responds to the interrupt by loading the appropriate ISR into RAM
- a flag is set to signal the ISR has begun
- once the interrupt has been serviced, the flag is reset
- the interrupt queue is checked again for further interrupts of a higher priority to the process that was originally being executed
- if there are, it is repeated until they are all serviced
- if there isn’t the contents of the stack are transferred back into the registers in memory
- FDE resumes
what is scheduling?
ensuring that all sections of programs being run (jobs) receive a fair amount of processing time
what are the two types of scheduling algorithms?
preemptive
non preemptive
what is a preemptive scheduling algorithm?
jobs are actively made to start and stop by the OS
what are the preemptive algorithms?
multilevel feedback queues
shortest remaining time
round robin
what is a non preemptive algorithm?
once a job has started it is left alone until its completed
what are the non preemptive algorithms?
first come first served
shortest job first
what is the round robin scheduling algorithm?
- each job is given a section of processor time (time slice) within which it is allowed to execute
- once each job has used its first time slice, the OS grants another time slice to each job
- this is repeated until a job has been completed and then removed from the queue
what are the disadvantages of round robin?
longer jobs will take a much longer time for completing (their execution is inefficiently split up into multiple cycles)
does not take into account job priority
what are the advantages of round robin?
easy to implement and understand (only requires a simple queue and timer)
fair and equitable preventing starvation
what is the FCFS scheduling algorithm?
jobs are processed in chronological order by which they entered the queue
what are the advantages of FCFS?
easy to implement
what are the disadvantages of FCFS?
does not allocate processor time based on priority
what is the multilevel feedback queues scheduling algorithm?
makes use of multiple queues, which are all ordered based on priority
what are the disadvantages of multilevel feedback queues?
difficult to implement because it has to decide which job to prioritise
what are the advantages of the multilevel feedback queue?
orders based on priority
what is the shortest job first scheduling algorithm?
the queue is ordered according to time required - longest at end
what are the disadvantages of shortest job first?
it requires the CPU to know how long each job will take (not always possible)
risk of starvation if short jobs keep getting added to the queue
what are the advantages of the shortest job first?
most suited to batch systems
maximises system throughput
what is the shortest remaining time scheduling algorithm?
the queue storing jobs to be processed is ordered according to the time left for completion - least time serviced first
what are the disadvantages of shortest remaining time?
risk of processor starvation for longer jobs if lots of shorter jobs are added to the queue
what are the advantages of shortest remaining time?
faster than SJF
what does BIOS stand for?
basic input output system
what is a bootstrap / bootloader?
the name given to the program that loads the OS from hard disk to main memory
what are the tests that the BIOS are responsible for?
-POST which ensure that all hardware are correctly connected and functional
-checking the CPU clock, memory and processor are operational
-testing for external memory devices connected to the computer
what does POST stand for?
power on self test
what actually is the BIOS and when is it used?
the PC points to it every time it starts up because it completes the various key tests before the OS starts up - the first program executed when a computer is switched on
what are device drivers?
programs which are provided by the OS and allow the OS to interact with hardware
what is a virtual machine?
a theoretical computer that is a software implementation of a computer system
what do virtual machines provide?
an environment with a translator for immediate code to run
what are virtual machines commonly used for?
to create a development environment for programmers to test programs on different OS
what are the advantages of using virtual machines for testing?
saving time and money of having to purchase devices solely for testing
what are the disadvantages of using virtual machines for testing?
considerably slower
what are the other uses of virtual machines?
protection from malware
running incompatible software
why would you use a virtual machine for protection from malware?
malware would affect the virtual machine not the device being used
why would you use a virtual machine for running incompatible software
programs specific to different OS/different versions of OS can be run with a virtual machine, saving time and money to purchase hardware
what is a distributed OS?
an OS that will run across multiple devices allowing the load to be spread across multiple processors when a task is run
what is an embedded OS?
catered towards a specific device, built to perform a small range of specific tasks
what is the advantage of an embedded OS?
significantly less power used
what are the disadvantages of an embedded OS?
limited functionality
hard to update
what is a multi tasking OS?
enables the user to carry out tasks simultaneously, using time slicing to switch quickly between programs and applications in memory
what is a multi user OS?
multiple users make use of one computer (typically supercomputer) - a scheduling algorithm must be used
what is a real time OS?
used in time critical systems - designed to complete tasks within a guaranteed time frame