1/43
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced |
|---|
No study sessions yet.
System vs application software
system software manages and is required to run hardware and applications (OS, utility, translators, library programs)
application software are programs used by the user (can be either open or closed/proprietary source- which can be off-the-shelf or bespoke)
What is an OS?
Operating system- system software that acts as an interface between the user and computer by controlling hardware
Function of API
application programming interface- a set of code libraries offered by the OS for programmers to write applications
What does the OS manage?
memory, resource/process (scheduling), files (editing/moving), input/output devices (device drivers), interrupt, utility software, user interface (UI), peripheral management (sending I/O data to a buffer to free cpu resources)
Describe memory management
paging- main memory is split into even sections (pages) - separate addresses +non-contiguous
segmentation- main memory split into logical-sized sections (segments) fitting the flow of the program
virtual memory- swapping sections of memory between main memory and the allocated space in secondary storage for virtual memory, which frees up space in main memory
issues that can be caused by virtual memory
disk thrashing- the computer freezes due to sections of memory being swapped too quickly (occurs more frequently as more virtual memory is used)
Describe interruption
interrupts are signals from computer software/hardware/clock that a process requires attention by the processor. These are stored in an interrupt register in a certain priority queue depending on their importance. The OS then decides how to allocate processor time depending on the ISR (interrupt service routine)
Examples of interrupts
Input/output device sending request signal
power failure
clock interrupt (for multitasking)
describe how the Interrupt Service Routine is called
interrupt register checked at the end of an FDE cycle
if the process in the interrupt register is of higher priority than the current one, the contents of the registers is sent to the stack
the appropriate ISR routine is loaded into RAM
a flag is set to signal the beginning of the interrupt cycle
after the ISR finished, the flag is reset and the interrupt register is checked for higher priority processes before the original process is reloaded
function of scheduling
An algorithm that divides processor time between current programs (jobs) being run, which are either pre-emptive (programs start/stop) or non pre-emptive (once started, runs until completion). This helps process jobs in the least possible time and fairly.
maximise throughput
ensure fairness between users (equal waiting time)
keep hardware resources busy
Types of scheduling algorithms
round robin (an equal section of processor time- time slice, based on a timer- is given to each program until it has finished & leaves the queue)
first come first served (first programs to enter the queue are the first completed)
multilevel feedback queues (multiple queues for differing priority jobs)
shortest job first (jobs are ordered based on time to complete, with the shortest done first to completion)
shortest remaining time (jobs are ordered in time remaining until completion, with shortest jobs done first)
Which scheduling algorithms are pre-emptive
round robin, multilevel feedback queues, shortest remaining time
which scheduling algorithms are non pre-emptive
first come first served, shortest job first
issues from shortest job first and shortest remaining time algorithms
Can lead to processor starvation (a process does not receive enough processor time to complete e.g. if it has a long completion time). User also has to decide how long the job will take
Which algorithms do not consider job priority
first come first served, round robin
types of operating systems
distributed (OS runs across multiple computers= load spread between multiple processors)
embedded (within another device with limited range of tasks)
multi-tasking (nearly simultaneous completion of tasks using time slicing)
multi-user (multiple users use one computer, so scheduling algorithm is needed else processor starvation may occur)
real time (performs all tasks in a guaranteed time frame e.g. in time-critical computer systems)
mobile OS
Process of starting up a computer
PC points to the BIOS in ROM
Checks are done to hardware +CPU
OS loaded into RAM via bootstrap
BIOS checks
POST (power on self test)- checks all hardware are correctly connected/functional
checking CPU clock, memory and processor work
testing for external memory devices connected to computer
Function of device drivers
Allow the processor to communicate with hardware- they are specific to the computer’s architecture
describe virtual computers
a theoretical computer (software that acts as a computer system +hardware). It provides an environment with a translator for intermediate code to run/test programs
Evaluate virtual computers
saves time/money on devices
less efficient at running intermediate code
Describe intermediate code
Code that is halfway between machine code and object code (independent of computer architecture but has slower execution)
difference between application and system software
application software helps person end-user tasks (specific task) and requires system software to run
system software allows the computer to run smoothly/ communication with hardware. It is a platform for applications to run on
What are utilities software
A type of system software that allows for consistent, high performance. Each utility software has a specific function maintaining the OS
Examples of utility software
compression (of larger files, usually to transmit across the internet)
disk defragmentation (ordering files contiguously to improve processor performance)
virus checker (detecting/removing threats in hard disk) + antivirus
automatic updating (keeps OS up to date= less threats)
backup (of specific files as copies)
file management (managing/organising data storage)
what is source code?
Object (programmer) code written before compiling it into machine code
2 types of source code
Open source and closed source
Evaluate open source code
Open source code is freely distributed without license along with the source code
can be modified/improved/sold
users can offer technical support
less security (may not be developed in controlled environment)
technical support may be wrong/incorrect
Evaluate closed source code
Closed source code requires the user to have a licence to access it (owner has copyright license)
regular, well-tested updates
software company gives technical support
high level of security
restriction of users who can use software at once
users cannot modify/improve code
Define translators
programs that convert high level source code to low-level machine code
Describe compilers
translate machine code all at once (first into intermediate code called bytecode) after error checks
if any changes are made to the source code the whole code must be recompiled
longer initial compilation process
the object/machine code is hardware-specific
the bytecode is platform independent, and can be translated by a virtual machine
name the stages of compilation process
lexical analysis
syntax analysis
code generation
code optimisation
describe lexical analysis
whitespace and comments (only necessary to humans) are removed
for keywords/operators (lexemes), tokens (computer-recognisable unique symbols) are made
lexemes and tokens are sorted into a symbol table (contains lexeme, its kind e.g. keyword, its type e.g. real, and run-time address e.g. entity’s address in program)
the symbol table is organised as a hash table
describe syntax analysis
tokens are grouped (into phrases) and are compared against syntax/grammar rules of the programming language (parsing)
any parts that do not fit with the rules are flagged as syntax errors and put in a list of errors
an abstract syntax tree of the source code is made
semantic analysis (on logic) is also done
describe code generation
the abstract syntax tree of the source code is used to generate machine code
describe code optimisation
searches through the code to find where it can be made more efficient (to reduce binary footprint as much as possible)
e.g. removing redundancies, grouping/replacing repeated code with efficient code
describe interpreters
first check for syntax errors, then translate source code line by line, spotting for errors on the way
slower than running compiled code
good for testing/debugging code
can be executed on a variety of devices as long as they have the translator
describe assembly code
One level up from machine code
the instructions used are dependent on the instruction set of the processor
function of libraries
pre-compiled and tested programs that can be linked, loaded and used by other programmers via static or dynamic linking
they can be reused and are error-free
function of linkers
Software that combines libraries and code into a single executable file
Static linkers are included in object/machine code when it is compiled to be used by the CPU= increased binary footprint but no longer needs to be installed
Dynamic linkers load the library in when the machine code is being used by the CPU= smaller binary footprint
function of loaders
They retrieve the executable file from secondary storage into main memory alongside the library files
If done statically, it is loaded with the machine code at the beginning= more memory space used
If done dynamically, the library (linked to the machine code by the linker) is loaded into memory when it is needed by the program
function of memory management
Organises the use of main memory by converting logical addresses (within a program) to physical addresses, which allows memory to be allocated and shared. Programs larger than main memory can also run (through paging).
features of safety-critical systems
takes multiple inputs at once
responds to inputs/sensors quickly
has failsafe mechanisms (detect failures in hardware components and respond appropriately)
has redundant hardware to replace failed hardware)
describe differences between off the shelf and bespoke applications
Bespoke
take longer to develop
may have undetected errors
have customisable features
more costly
Off the shelf:
cheaper
more unwanted features
can be installed immediately
error-free, well tested