SLR 2 Flashcards
What features do operating systems provide
- Memory management (paging, segmentation, virtual memory)
- Resource management (scheduling)
- File management (moving, editing, deleting files and folders)
- Input/ Output management (device drivers)
- Interrupt management
- Utility software (disk defragmenter, backup, formatting etc.)
- Security (firewall)
- User interface
What is segmentation
Segmentation is the splitting up of memory into logical sized divisions
Interrupts
Interrupts are signals generated by software or hardware to indicate to the processor that a process needs attention
Different types of operating systems (D)
Distributed - This is a type of operating system which is run across multiple devices, allowing the load to be spread across multiple computer processors when a task is run.
Different types of operating systems (E)
Embedded - Built to perform a small range of specific tasks, this operating system is catered towards a specific device. They are limited in their functionality and hard to update although they consume significantly less power than other types of OS.
What does a translator do?
A translator is a program that converts high-level source code into low-level object code, which is then ready to be executed by a computer
What is a compiler?
Compilers translate high-level code into machine code all at once, after carrying out a number of checks and reporting back any errors
What is a interpreter?
Interpreters translate and execute code line-by-line. They stop and produce an error if a line contains an error
Assembler
Assemblers translate assembly code into machine code. Each line of assembly code is equivalent to almost one line of machine code so code is translated on almost a one-to-one basis.
Assembly code
Assembly code is considered to be a low-level language as it is the ‘next level up’ from machine code. Assembly code is platform specific
Stages of compilation
Lexical Analysis
Syntax Analysis
Code generation
Optimisation
Lexical Analysis
whitespace and comments are removed from the code.
The remaining code is analysed for keywords and names of variables and constants. These are replaced with tokens and information about the token associated with each keyword or identifier is stored in a symbol table.
Syntax Analysis
tokens are analysed against the grammar
and rules of the programming language. Any tokens that break the rules of the programming language are flagged up as syntax errors and added to a list of errors.
e.g. incomplete brackets or variables not defined
Semantic Analysis (Within Syntax Analysis)
where logic mistakes within the program are detected. e.g. multiple declaration, undeclared identifiers
Code Generation
The abstract syntax tree produced in the syntax analysis stage is used to produce machine code.
Optimisation
This stage of compilation searches through the code for areas it could be made more
efficient. The aim of optimisation is to make the code faster to execute although this stage can significantly add to the overall time taken for compilation.
Linkers
This is a piece of software that is responsible for linking external modules and libraries included within the code
What are the 2 types of linkers and what are their functions?
Static - Modules and libraries are added directly into the main file. This increases the size of the file. Any updates to modules and libraries externally will not affect the program.
Dynamic - Addresses of modules and libraries are included in the file where they are referenced. When the program is run, the loader retrieves the program at the specified address so it can be executed
What are loaders?
Loaders are programs provided by the operating system. When a file is executed, the loader retrieves the library or subroutine from the given memory location.
Libraries
Libraries are pre-compiled programs which can be incorporated within other programs
using either static or dynamic linking
Alpha testing
Alpha testing is carried out in-house by the software development teams within the company. Bugs are pinpointed and fixed.
Beta testing
Beta testing is carried out by end-users after alpha testing has been completed. Feedback from users is used to inform the next stage of development.
Black box testing
Simply checks wherever the input produces the expected output
White box testing
Involves testing the algorithms in the code and making sure all parts of those algorithms functions as intended, unlike black box testing, white box testing also checks the overall efficiency of the code