1.2.2 Flashcards
nature of applications
There are too many types of application software to have detailed knowledge of all of them
have knowledge/experience of a range of common categories:
Word processor
Database
Web browser
Graphics manipulation
Based on a given scenario, you need to recommend (with justification) the use of:
Generic applications
Specific applications
hardware
physical parts of a computer system and related devices, internal or external
e.g. motherboards, hard drives, RAM, monitors, keyboards, mice, printers, etc…
definition & examples
software
definition & examples & 2 main types
Keep your computer safe and running efficiently
Provide you with useful tools to manage your files and applications
covers all computer programs most software falls into broad categories
such as: application, system and utility software.
main 2 branches are: system & application software
system software - 2 main branches
operating systems
utility software
operating systems - examples
Windows
Linux
macOS
iOS
utility software - examples
Antivirus
Defragmentation
Backup
Compression
Firewalls
application software - examples
Presentation
Word processor
Spreadsheet
Web browser
Communication
Email
Games
Apps
Multimedia
Photo editing
Video editing
utilities
file repair
backup
compression
defragmentation
anti-malware
file management
device drivers
utility - file repair
software that attempts to correct these issues and restore the file to its original working state
utility - backup
critical data being stored in a digital format, makes backing up important files essential
can be set up to be manual, automatic or scheduled
utility - data compression
reduces the size of a file so it takes up less space and downloads faster over the internet
Compressed files must be extracted before they can be read
utility - defragmentation
reorganises files on a hard disk, putting fragments of files and free space back together
reduces the movement of the read/write head across the surface of the disk, which speeds up file access
SSdrives should not be defragmented, as they have no moving parts
utility - anti malware
helps keep your computer and files safe from many types of malware including:
Viruses
Trojans
Worms
Spyware
open source
and example
Users can modify and distribute the software
Can be installed on any number of computers
Support provided by the community
Users have access to the source code
May not be fully tested
e.g. Linux OS
open source - pros
for the user and creator
user - Software is free
- Wide community modification
creator - Gets their software out there to a wider community
open source - cons
for the user and creator
user - Can be poorly supported
- Some features might not be well tested
creator - Little-to-no financial gain
closed source
and example
Protected by the Copyright Design and Patents Act
Users cannot modify the software
Usually paid for and licensed per user or per computer
Supported by developers who do not release source code
Tested by developer prior to release, although it may run beta programs
e.g. Windows
closed source - pros
for the user and creator
user - Well supported, tested and professional built product
creator - They receive an income for their product
closed source - cons
for the user and creator
user - Cost or ongoing subscription fee
creator - Constant demand from community for more features and improvements
- Piracy issues
source code
high level language readable and writable by humans
assembly code
low level language readable and writable by humans
machine code
pure binary form of source code
translators
turn source code into machine code
assemblers
compilers
interpreters
assembler - description
Translates assembly language into machine code
Takes basic commands and operations from assembly code and converts them into binary code that can be recognised by a specific type of processor
The translation process is typically a one-to-one process from assembly code to machine code
assembler - pros
Programs written in machine language can be replaced with mnemonics, which are easier to remember
Memory-efficient
Speed of execution is faster
Hardware-oriented
Requires fewer instructions to accomplish the same result
assembler - cons
Long programs written in such languages cannot be executed on small computers
It takes lot of time to code or write the program, as it is more complex in nature
Difficult to remember the syntax
Lack of portability between computers of different makes
complier - description
Translates source code from high-level languages into object code and then machine code to be processed by the CPU
The whole program is translated into machine code before it is run
complier - pros
No need for translation at run-time
Speed of execution is faster
Code is usually optimised
Original source code is kept secret
complier - cons
Source code is easier to write in a high-level language, but the program will not run with syntax errors, which can make it more difficult to write the code
Code needs to be recompiled when the code is changed
Designed for a specific type of processor
interpreter- description
Translates source code from high-level languages into machine code, ready to be processed by the CPU
The program is translated line by line as the program is running
interpreter- pros
Easy to write source code, as the program will always run, stopping when it finds a syntax error
Code does not need to be recompiled when code is changed
It is easy to try out commands when the program has paused after finding an error – this makes interpreted languages very easy for beginner programmers to learn to write code
interpreter- cons
Translation software is required at run-time.
Speed of execution is slower
Code is not optimised
Source code is required
stages of compliation
lexical analysis
syntax analysis
code generation
code optimisation
compliation - lexical analysis
the lexer converts lexemes in the source code into tokens
the lexer reads the source code (scanning the code letter by letter)
it checks if the lexeme is valid using a set of rules that allow every lexeme to be identified
compliation - syntax analysis
receives its inputs in the form of tokens from lexical analysers
analyses the syntactical structure of the input, checks if it is in the correct syntax of the programming language
by analysing the token stream against production rules to detect any errors in the code
Checks for errors and reports them
Building an abstract syntax tree (parse tree)
compliation - code generation
Abstract code tree converted to object code.
Object code is the machine code produced before the final step (linker) is run.
compliation - code optimisation
attempts to reduce the execution time of the program by:
Spotting redundant instructions and producing object code that achieves the same effect as the source program – but not necessarily by the same means.
Removing subroutines that are never called.
Removing variables and constants that are never referenced.
can considerably increase compilation time for a program
linkers
responsible for putting the appropriate machine addresses in all the external call and return instructions so all modules and external library routines are linked together correctly.
It also links any separately compiled subroutines into the object code.
linkers - 2 methods to pull libraries
static linking
dynamic linking
linkers - static linking
All the required code from the libraries is included directly in the finished machine code
can result in large executable program files
linkers - dynamic linking
Compiled versions of the required libraries are stored on the host computer.
The OS links the required code from the library as the program is running.
While this cuts down on the size of the compiled machine code, if the dynamic libraries change, the program may stop because it tries to call a subroutine in the wrong way.
loaders
the part of the OS that loads the executable program file (machine code) into memory, ready to be run.
When using dynamic linking, it will also be responsible for loading the required libraries into memory.
Libraries
Ready-compiled and tested programs that can be run when needed
libraries - uses
typically grouped together into software libraries
Most programming languages have extensive libraries of pre-built functions
e.g. math library in Python provides common solutions to many everyday problems encountered by programmers who are dealing with numbers
libraries - DLL
Dynamic Link Libraries
contain sub-routines written to carry out a common task on the Windows OS – e.g., Save As
the programmer only needs to do is call the appropriate DLL sub-routine with the correct parameters
libraries - pros
Quick and easy to use and hook into your own code.
Pre-tested, so you can be relatively sure they are already free from errors.
Pre-compiled, so they are typically optimised to run quickly.
libraries - cons
Adding functionality or making specific tweaks can be difficult – or impossible.
Sometimes you are “black-boxed” from the actual implementation.
You have to trust that the developers will continue to maintain the library.