1.2.2 Applications Generation Flashcards
Utility Software
System Software designed to optimise the performance of the computer or perform tasks.
Tasks:
-Backing up files
-Restoring corrupted files from back up files
-Compressing / decompressing data
-Encrypting data before transmission
-Providing a firewall
Disk Defragmenter
A program that will reorganise a magnetic hard disk so that files that have been split up into blocks and stored all over the disk will be recombined in a single series of sequential blocks.
Automatic Backup
Allows the user to specify:
-Where you want to store the back up
-What you want to back up
-How you want to run the back up
When you want to run the backup
Automatic Updating
Makes sure that any software installed on the computer is up to date.
Firewalls and antivirus software must be updated regularly.
Virus Checker
Checks your hard drive and depending on the level of protection offered, incoming emails and internet downloads for viruses and removes them.
Compression software
Zipped/compressed files can be transmitted more quickly over the interned when they are compressed.
Off the Shelf Software
- Less expensive since the cost is shared among all the other people buying the package
- May contain unwanted features, some desirable but non-essential features may be missing
- Ready to be installed immediately
- Well tested/error-free
Bespoke Software
- More costly/requires expertise to analyse requirements
- Features customised to user requirements
- May take a long time to develop
- May contain errors that do not surface immediately
General-purpose Software
eg. word processor, spreadsheet, graphics package
Open Source
-Software that is licensed for use but there is no charge for it (anyone can use it).
-Must be distributed with the source code (anyone can modify it)
-Developers can sell the software they have created.
-Any new software created from the Open Source software must also be open sourced.
-Tends to be more organic - it changes over time as developers modify source code and create new versions
Closed Source/Proprietary Software
- Sold in the form of a license to use it
- Restrictions on how software can be used eg. how many users
- Company holds copyright => user does not have access to source code => cannot be modified
- Support available from the company
Interpreter
- Translates code written in a high level language into machine code line by line
ADVANTAGES:
- Source code can be run on any machine with the interpreter => NOT HARDWARE SPECIFIC
- If a small error is found, no need to recompile the entire program
Compiler
- translates a whole program written in a high-level language into executable machine code, going through several stages
- The resulting machine code is called object code => hardware-specific
ADVANTAGES:
- Program can be run many times without the need to recompile
- Faster to execute
- Executable code does not require the interpreter to run
- Compiled code cannot be easily read and copied by others
Assembler
-
Assembler Overview:
- Assembly code is a low-level language, closely tied to machine code instructions.
- Each assembly instruction is typically equivalent to one machine code instruction.
-
Assembler Functionality:
- The assembler program converts each assembly code instruction into the machine code equivalent.
- The input is called the source code, and the output (machine code) is the object code.
Features of Assemblers
Hardware Dependency:
- The instruction set of a computer, determining its machine code instructions, is hardware-dependent.
- Different processors have different instruction sets and corresponding assembly codes.
Code Efficiency:
- Several lines of assembly code may be needed to achieve the same result as a single line of high-level code.
Translation Process:
- Assembly code must be translated into machine code or bytecode before execution.
- This translation is performed by an assembler program.
Bytecode
- In Java, code is converted into bytecode
- Bytecode can be run/interpreted on any machine which has JVN (Java Virtual Machie) installed
- This means it is not hardware specific and it is hidden
Stages of Compilation
- Lexical Analysis
- Syntax Analysis
- Code Generation and Optimisation
Lexical Analysis
- Superfluous spaces are removed
- All comments removed
- Simple error checking performed
- All keywords, constants, and identifiers are replaced by ‘tokens’ (unique symbols)
code is converted into standardised form that is easily understandable: comments/unnecessary
Syntax Analysis
- The stream of tokens from the lexing stage is split up into phrases
- Each phrase is parsed which means it is checked against the rules of the language
- If the phrase is not valid, an error will be recorded
For example, this sequence of tokens may not be valid and this would be picked up by syntax analysis
<number> <operator> <identifier>
(e.g. the source code might be 5 = a)
</identifier></operator></number>
Symbol Table
Contains an entry for every keyword and identifier. It will show:
- Identifier or keyword
- The kind of item (variable, array)
- The type of item (real, integer)
- Run time address/value if it is a constant
Semantic Analysis
Semantics define the meaning rather than the grammar of the language. It is possible to create a sequence of tokens which is valid syntax but is not a valid program. Semantic analysis checks for this kind of error.
For example this phrase may be valid syntax:
<if> <identifier> <operator> <number>
(e.g. the source code might be: if a > 5 )
…however if the identifier has not previously been declared then semantically it is not a valid program
</number></operator></identifier></if>
Code Generation and Optimisation
Attempts to reduce the execution time of the object program.
Code optimisation aims to:
* - Remove redundant instructions
* - Replace inefficient code with code that achieves the same result but in a more efficient way
Disadvantages:
* Increases compilation time
* May produce unexpected results.
Linker
Needs to put the appropriate memory addresses in place so that the program can call and return from a library function
Loader
It copies the program and any linked subroutines into main memory to run.
Libraries
Ready-compiled programs, grouped in software libraries, that can be loaded and run when required.