1.2.2: Applications Generation Flashcards
What can software be categorised as?
- Applications Software or Systems Software
What is Applications Software?
- Used by the end user to perform one specific task
- Requires systems software in order to run
Examples: Word processing, Spreadsheets, Web Browsers
What is Systems Software?
- Low-level software that is responsible for running the computer system smoothly, interacting with hardware and providing a platform for applications software to run
- User does not directly interact with the Systems Software but the software ensures high performance for user
Examples: Utility programs, OS, Device Drivers
What are Utilities?
- Key pieces of System Software necessary to ensure consistent, high performance of the OS
- Each Utility has a specific function linked to the maintenance of the OS
What is Compression?
- The OS provides Utilities that enable Compression and Decompression of files
- Used when Compressing large files to be transmitted across the internet
- Commonly used to Compress scanned files
What is Disc Defragmentation?
- Read/write times slow when the hard disc becomes full because files get fragmented as they are stored in different parts of memory
- Disk Defrag Utility rearranges the contents of the hard drive so they can be accessed faster, improving performance
What is Antivirus?
- Detecting potential threats, alerting user, and removing the threats
What is Automatic Updating?
- Ensures the OS is kept up to date, with any updates being automatically installed upon computer restart
- Updates tackle bugs/security flaws
- Ensure the system is less vulnerable to malware and hacking threats
What is Backup?
- Automatically creating routine copies of specific files selected by the user
- How often files are backed up also specified by the user
- In the event of a power failure, malicious attack, or other incident, the files are recoverable
What is Source Code?
- Written by a programmer and refers to Object (AKA Machine) Code before it has been compiled
What factors determine whether a user chooses Open or Closed Source software?
- Depends on the suitability of the software to the task it will be used for
- Costs: Implementation, Maintenance, Training of staff, Licenses
- Functionality: Features available, Ease of use
What is Open Source Software?
- Can be used by anyone without a license and is distributed with the Source Code
What are advantages of Open Source Software?
- Can be modified and improved by anyone
- Technical support from online community
- Can be modified and sold on
What are disadvantages of Open Source Software?
- Support available online may be insufficient or incorrect, no user manuals
- Lower security as may not be developed in a controlled environment
What is Closed Source (Proprietary) Software?
- Requires the user to hold an appropriate license to use it
- Users cannot access the Source Code as the company owns the copyright license
What are the advantages of Closed Source (Proprietary) Software?
- Thorough, regular, and well-tested updates
- Company owning software provides expert support and user manuals
- High levels of security as developed professionally
What are the disadvantages of Closed Source (Proprietary) Software?
- License restricts how many people can use the software at once
- Users cannot modify and improve software themselves
What is a Translator?
- A program that converts high-level Source Code into low-level Object (AKA Machine) Code, ready for execution
What are Interpreters?
- Translate and execute code line-by-line, stop and produce an error if the line contains an error
What are the advantages of using an Interpreter?
- Useful for testing sections of code and pinpointing errors
- Time is not wasted compiling the entire program before it has been fully debugged
- Code can be executed on a range of platforms as long as the right Interpreter is available (Interpreted code is more portable)
What are the disadvantages of using an Interpreter?
- May initially appear faster than compilers as code is instantly executed, but are slower as code must be translated each time it is executed
- Interpreted code requires an Interpreter in order to run on different devices
What are Compilers?
- Translate high-level code all at once after carrying out diagnostics and reporting back errors
What is the advantage of using a Compiler?
- Code can be run without a Translator present
What are the disadvantages of using a Compiler?
- Initial Compilation process is LONGER than with an Interpreter or Assembler
- If changes are made, the whole program must be recompiled
- Once Source Code is Compiled to produce Machine Code, it can only be executed on certain devices: Compiled code is specific to a particular processor type and OS
What is an Assembler?
- Translate Assembly Code into Machine Code
How does Assembly Code relate to Machine Code?
- Each line of Assembly Code is equivalent to almost one line of Machine Code
- Translated on an almost one-to-one basis
Where can Assembly Code be used?
- Assembly Code is platform specific, as the instructions are dependent on the instruction set of the processor
- Considered to be low-level as it is ‘next level up’ from Machine Code
What is the first stage of Compilation?
- Lexical Analysis: Where any white spaces or comments are removed
What happens during Lexical Analysis?
- Remaining code after white spaces and comments are removed is scanned for keywords and variable and constant names
- All keywords, variable and constant names are replaced with a token and information about the token is stored in a symbol table
What are the token classes, with examples?
- Identifier: Any function or variable name
- Keyword: As, If, Else, Endif, Function, EndFunction, Return
- Separator: [ ] &
- Operator: + - * / ^ DIV MOD < > <= >=
- Literal: (strings) Hello World!
- Number: -4, 0, 3, 4
- Quote: “ “
- Bool: True, False
-Datatype: Integer, Decimal, String, Boolean
What is the second stage of Compilation?
- 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
- Examples of errors: Undeclared variable type, Incomplete set of brackets
- Further detail about the identifiers is also added to the symbol table
What is produced during Syntax Analysis?
- An abstract Syntax Tree, a representation of the source code
What is Semantic Analysis?
- Where logic mistakes within the program are detected
- Examples of Semantic errors: Multiple declaration, Undeclared identifiers
What is the third stage of Compilation?
- Code Generation: The abstract tree produced at Syntax Analysis is used to produce Machine Code
What is the fourth stage of Compilation?
- Code Optimisation: Searching through the code for areas to improve efficiency
- Abstract Code converted into Object Tree
What is Abstract Code?
- The Machine Code produced before the final step (linker) is run
What is the aim of Code Optimisation?
- To make code faster to execute and use as little memory as possible
How is Code Optimisation completed?
- Redundant parts of code are detected and removed
- Repeated sections of code may be grouped and replaced with more efficient pieces of code that produce the same result
What is a danger of excessive Code Optimisation?
- Excessive Code Optimisation may alter the way in which the program behaves
What does a Linker do?
- Responsible for linking external software modules and libraries included within the code
- Also links any separately compiled subroutines into the Object Code
What is Static Linking?
- Modules and libraries are added directly into the main file (Increase in file size)
- Any updates to modules and libraries externally will not affect the program (A specific version of a library can be used)
What is Dynamic Linking?
- Compiled versions of the required libraries are stored on the host computer (Addresses of modules and libraries are included in the file where they are referenced)
- The OS links the required code from the library as the program is running
- Files remain small and external updates feed through to the main file: There is no need to rewrite code
- If the dynamic libraries change, the program may stop because it tries to call a subroutine the wrong way
What is a Loader?
- Programs provided by the OS that retrieve the library or subroutine from the given memory location when a file is executed
What is the purpose of the Loader during Dynamic Linking?
- It is responsible for loading the required libraries into memory
What are Libraries?
- Pre-compiled and tested programs that can be incorporated within other programs (Via either Static or Dynamic Linking)
What are the advantages of Libraries?
- Ready to use and error free
- Can be reused within multiple programs
- Often used to provide a specialised range of functions which would otherwise require a lot of time and effort to develop
- Popular libraries include mathematical and graphical functions
What are the benefits of using Libraries?
- Quick and easy to use and hook into own code
- Pre-tested: The user can be relatively sure they are free from errors
- Pre-compiled: Are typically optimised to run quickly
What are the drawbacks of using Libraries?
- Adding functionality or making specific tweaks can be difficult - or impossible
- Sometimes users are “black-boxed” from certain implementation
- The user has to trust the developers will continue to maintain the library