1.2.1 systems software Flashcards
Operating systems
-Collection of programs that work together to provide an interface between the user and computer
-Memory management, resource management, file management, input/output management, interrupts, user interface
Memory management-
Memory needs to be shared fairly between multiple programs being used- main memoty not large enough to store all programs being used
-Paging, segmentation
Paging
-Memory is split into equal sized fixed pages.
-Can be swapped between main memory and the hard disk as needed
Segmentation
-Splitting up memory into logical sized divisions called segments which vary in size
-Representative of the structure and flow of the program, egments allocated to blocks of code such as conditional statements or loops
Virtual memory
-Uses sections of the hard drive to act as RAM when the space in main memory is insufficient.
-Sections of the programa not currently in use are temporarily moved into virtual memory through paging whuch frees up memory for others in RAM
-May cause disk thrashing
Interrupts
-Signals generated by software or hardware to indicate to the processor that a process needs attention
-Stored in order of priority using a priority queue in the interrupt register
-E.g. printer signalling a print job or a peripheral signalling power failure
Interrupt Service Routine
-Processor checks the contents of the interrupt register at the end of each FDE cycle
-If an interrupt exists of a higher priority to the process being executed, the current contents of the registers in the CPU are temporarily transferred into a stack.
-The processor loads the ISR into RAM and a flag is set to signal the ISR has begun
-Once the interrupt has been serviced, the flag is reset. Interrupt queue is checked again for further interrupts if a higher priority
-If not, the contents of the stack are transferred back into the registers in RAM and FDE resumes as before
Scheduling
-Ensure all sections of programs being run receive a fair amount of processing time
-Can be:
* Pre-emptive: Jobs are actively made to stop and start by the OS
* Non pre-emptive: Once a job is started, it is left alone until completed
Round Robin
-Each job is given a slice of processor time within which it is allowed to execute.
-Once each job in the queue has used its first time slice, the OS grants each job another time slice
-Longer jobs take a long time to complete, does not account for priority
-Pre-emptive
First come first served
-Jobs processed in chronological order by which they entered the queue.
-Easy to implement, not accounting for priority
Multilevel feedback queues
-Makes use of multiple queues, each ordered based on a different priority
-May be difficult to implement due to deciding which job to prioritise based on priorities.
Shortest job first
-The queue storing jobs to be processed is ordered according to time required for completion, with the longest jobs serviced at the end
-Processor starvation if the short jobs continue being added to the job queue (longer jobs may never receive enough processor time to be executed)
Shortest remaining time
-Ordered according to time left for completion
Distributed OS
OS run across multiple devices, allowing the load to be spread across multiple computer processors when a task is run
Embedded OS
-Built to perform a small range of specific tasks
-Limited in functionality but consume less power
Multi-tasking OS
-Enable user to carry out tasks seemingly simultaneously by time slicing to switch quickly between programs and applications in memory
Multi-user OS
-Multiple users make use of one computer within a multi-user system.
-A scheduling algorithm must be used to ensure processor time is shaed fairly between jobs
Real time OS
-Used in time-critical computer systems, designed to perform a task within a guaranteed time frame
-e.g. self-driving cars
-The first program that runs when a computer system is switched on. PC register points to the location of the BIOS.
-Responsible for running:
* POST: ensures all hardware are connected and functional
* Checking the CPU clock, memory and processor is operational
Device drivers
-Computer programs which are provided by the OS and allow the OS to interact with hardware
-Specific to the computer’s architecture
Virtual Machines
-A theoretical computer in that it is a software implementation of a computer system
-Provides an environment with a translator for intermediate code to run.
-Protection from malware, running incompatible software