1.2.2 Applications Generation Flashcards
What are the two main categories of software?
- Applications Software
- Systems Software
Applications Software
Designed to be used by the end-user to perform one specific task.
Types:
- Off-the-shelf
- Proprietary
- Open Source
- Custom Written
Examples:
- Desktop publishing
- Word processor
- Spreadsheets
- Web browsers
Systems Software
Needed by the system to control hardware and run applications.
Types:
- Utility Software
- Translators
- Library Programs
- Operating Systems
Utility Programs
Optimise the performance of a computer and perform useful background tasks
Examples:
- Disk defragmenter
- Automatic backup
- Automatic updating
- Antivirus software
- Compression software
Disk Defragmentation
- Re-arranges the contents of the hard drive so they can be accessed faster to improve performance
- Will try to ensure all parts of a file are contiguous by moving other parts as necessary
- File allocation table (FAT) may be used to show file placement
Recommended to have 15+% of space left when defragging so the file can be copied and moved (in case of corruption)
Defragmentation Benefits
- Files are stored closer together
- Resulting in a faster access time
Automatic Backup
Backup of data in permanent storage can be automated, specifying:
- Where (Backup location)
- When (Backup time)
- What (What data is backed up)
- How (Backups compressed or not)
Automatic Updating
Runs in background, detecting software update releases and automatically installing them
Some updates may add new software features, or fix security issues
Antivirus Software
Scans permanent storage for viruses by comparing files to known virus definitions
- Must be kept up to date with new virus definitions to be effective
- May sometimes flag a harmless file as a virus
Compression Software
Can reduce the size of files - useful for sending files across the internet
Application Software Types
- General Purpose
- Bespoke
- Special Purpose
General Purpose Software
Can be used by the general public
(e.g. General apps, spreadsheets, calculator)
Bespoke Software
Software custom created for a specific user/company
Special Purpose
Software used by a small fraction of the public
(e.g. Graphic design apps, accounting apps)
Open Source Software
Allows anyone to access its source code
- Anyone can modify and sell it, on the condition that the software produced is open source too
Benefits of Open Source Software
- Can be modified and improved by anyone
- Technical support from online community
- Can be modified and sold
Disadvantages of Open Source Software
- Support available online may be insufficient or incorrect
- No user manual
- Lower security as it may not be developed in a controlled environment
Closed Source Software
Software that doesn’t allow the public access to the source code
-Provided as a fully compiled, executable set of files
- Users usually have to pay for access to the software -> they are buying a license to use the software, NOT the software itself
- May be restrictions on how the software is used after purchase
Benefits of Closed Source Software
- Thorough, regular and well-tested updates
- Company that owns the software can provide expert support or create a user manual
- High levels of security due to it being professionally developed
Disadvantages of Closed Source Software
- License can restrict how many people can use the software at once
- Users cannot modify and improve the software
Application Selection Criteria
- Functionality - Does it do what you want it to do?
- Hardware - Will it run on the hardware?
- Availability - Already exists or already written?
- Cost - How much is it?
- Reliability - Are there bugs, has it been tested?
Types of Translators
- Compilers
- Assemblers
- Interpreters
Compilers
Translates the entire program from high level language to machine code
- Produces hardware-specific executable files written in machine code (called object code) that can be downloaded
Interpreters
Translates high level language into machine code going line by line
Benefits of Compilers
- Program can be run many times without needing to recompile
- Faster to execute
- Executable code doesn’t require the interpreter to run
- Compiled code cannot be easily read & copied by others
Benefits of Interpreters
- Source code can be run on any machine with the interpreter
- If a small error is found, the entire program doesn’t need to recompile
- Useful for debugging as it can return the location of the error
Assemblers
Translates assembly code instructions to machine code
Each processor has its own instruction set so the object code will be hardware specific
Stages of Compilation
- Lexical Analysis
- Syntax Analysis
- Code Generation
- Code Optimisation
Lexical Analysis
- All unnecessary comments and spaces removed
- Keywords, constants & identifiers replaces with tokens corresponding their function in the program
- Information about the token associated with each keyword or identifier is stored in a symbol table that the lexer creates
Syntax Analysis
- Stream of tokens from previous stage split up into tokens
- Each phrase is checked against the rules of language to make sure they’re valid
- If the phrase is not valid, an error will be recorded
- Semantic analysis also carried out, in which logic mistakes within the program are detected
- Abstract Syntax Tree produced (a representation of the source code in the form of a tree)
Code generation
The abstract syntax tree produced in the previous stage is used to produce machine code
(A major distinguishing feature between compilers and interpreters - compilers produce an executable file while interpreters don’t)
Code Optimisation
Aims to:
- Remove redundant instructions
- Replace inefficient code with code that achieves the same result but in a more efficient way
Risks:
- This stage can significantly add to the overall time taken for compilation
- Excessive optimisation may alter the way in which the program behaves
Library
Pre-compiled programs which can be incorporated within other programs (via linkers)
Library functions can be called within a program
Use of Libraries
Used to provide a specialised range of functions which would otherwise require a lot of time and effort to develop
- Ready-to-use
- Error free
- Save time developing & testing modules
- Can be reused within multiple programs
Linkers
Piece of software that is responsible for linking external modules and libraries included within the code
Types of Linkers
- Static
- Dynamic
Static Linkers
Adds modules and libraries directly to the main file.
- Increases the size of the file
- Updates to the modules and libraries externally won’t affect the program, meaning a specific version of a library can be used
Dynamic Linkers
Includes addresses of modules and libraries in the file where they are referenced
Loader retrieves the program at the specified address for execution when the main program is run
Pro:
- File remains small and external updates feed through to the main file