1.2.2

Cards (23)

  • Applications software
    Software designed to be used by the end-user to perform one specific task
  • Systems software
    Low-level software that is responsible for running the computer system smoothly, interacting with hardware and generally providing a platform for applications software to run
  • Utilities
    Key piece of system software integral to ensuring the consistent, high performance of the operating system
  • Open source
    Source code can be used by anyone without a license and is distributed with the source code
  • Closed source
    Requires the user to hold an appropriate license to use it, users cannot access the source code as the company owns the copyright license
  • Advantages of open source
    • Can be modified and improved by anyone
    • Thorough, regular and well-tested updates
    • Technical support from online community
  • Advantages of closed source
    • Company owning software provides expert support and user manuals
    • Can be modified and sold on
    • High levels of security as developed professionally
  • Disadvantages of open source
    • Support available online may be insufficient or incorrect, no user manuals
  • Disadvantages of closed source
    • License restricts how many people can use the software at once
    • Lower security as may not be developed in a controlled environment
    • Users cannot modify and improve software themselves
  • Translator
    Program that converts high-level source code into low-level object code, which is then ready to be executed by a computer
  • Compiler
    Translates high-level code into machine code all at once, after carrying out a number of checks and reporting back any errors
  • Interpreter
    Translates and executes code line-by-line, stops and produces an error if a line contains an error
  • Assembler
    Translates assembly code into machine code, each line of assembly code is equivalent to almost one line of machine code
  • Stages of compilation
    1. Lexical analysis
    2. Syntax analysis
    3. Code generation
    4. Optimisation
  • Lexical analysis
    Whitespace and comments are removed from the code, keywords and names of variables and constants are replaced with tokens, 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 are flagged up as syntax errors, an abstract syntax tree is produced which is a representation of the source code in the form of a tree, semantic analysis is also carried out to detect logic mistakes within the program
  • Code generation
    The abstract syntax tree produced in the syntax analysis stage is used to produce machine code
  • Optimisation
    Searches through the code for areas it could be made more efficient, the aim is to make the code faster to execute although this stage can significantly add to the overall time taken for compilation, insignificant, redundant parts of code are detected and removed, repeated sections of code may be grouped and replaced with a more efficient piece of code
  • Linker
    Piece of software responsible for linking external modules and libraries included within the code
  • Static linker
    Modules and libraries are added directly into the main file, increases the size of the file, any updates to modules and libraries externally will not affect the program
  • Dynamic linker
    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, files remain small and external updates feed through to the main file
  • Loader
    Program provided by the operating system, when a file is executed, the loader retrieves the library or subroutine from the given memory location
  • Libraries
    Pre-compiled programs which can be incorporated within other programs using either static or dynamic linking, ready-to-use and error free, save time developing and testing modules, can be reused within multiple programs