1.2.2 - Applications Generation

Cards (41)

  • Applications Software
    • designed to be used by end-user to perform a specific task
    • requires systems software to run
  • Applications Software - Examples
    • desktop publishing
    • word processing
    • spreadsheets
    • web browsers
  • Systems Software
    • low-level software
    • responsible for running computer system smoothly, interacting with hardware and providing a platform for application software to run
    • user does not directly interact with systems software
    • ensures high performance for user
  • Systems Software - Examples
    • library programs
    • utility programs
    • operating system
    • device drivers
  • Utilities
    • key system software essential to ensuring consistent high performance of the OS
    • each program has a specific function linked to maintenance of the OS
  • Utilities - Examples
    • compression
    • disk defragmentation
    • antivirus
    • automatic updating
    • backup
  • Compression
    • enables files to be compressed and decompressed
    • used when compressing large files to be sent across the internet
    • commonly used to compress scanned files
  • Disk Defragmentation
    • as hard disk fills, r/w times slow down because files become fragmented as they're stored in different parts of memory
    • this utility rearranges contents of the hard drive so they can be accessed faster
    • this improves performance
  • Antivirus
    • responsible for detecting potential threats to computer
    • alerts user and removes threats
  • Automatic Updating
    • ensures OS is kept up to date
    • any updates are automatically installed when computer is restarted
    • updates tackle bugs or security flaws
    • ensures system is less vulnerable to malware/hacking threats
  • Backup
    • automatically creates routine copies of specific files chosen by user
    • how often the files are backed up is also chosen by the user
  • Source Code
    • written by programmer
    • object code before it's been compiled
  • Open Source
    • can be used by anyone without a license
    • is distributed with source code
  • Open Source - Advantages
    • can be modified and improved by anyone
    • technical support from online community
    • can be modified and sold on
  • Open Source - Disadvantages
    • support available online may be insufficient/incorrect
    • no user manuals
    • lower security as might not be developed in a controlled environment
  • Closed Source
    • requires user to hold an appropriate license to use it
    • users cannot access source code as company owns copyright license
  • Closed Source - Advantages
    • thorough, regular and well-tested updates
    • company owning software provides expert support and user manuals
    • high levels of security as developed professionally
  • Closed Source - Disadvantages
    • license restricts how many people can use software at once
    • users cannot modify and improve software themselves
  • Open vs Closed - What to Consider
    • suitability of software to the task it will be used for
    • costs - implementation, maintenance, training, license
    • functionality - features available, ease of use
  • Translators
    • a programs that converts high-level source code into low-level object code
    • it's then ready to be executed by computer
  • High-Level Code
    • written and understood by programmer but not the computer
  • Low-Level Code
    • can be executed by computer but not directly understood
  • Compiler
    • translates code all at once after carrying out checks and reporting back errors
    • initial process is longer than using an interpreter or assembler
    • if changes need to be made, whole program must be recompiled
    • once compiled, code can only be executed on certain devices as compiling code is specific to a certain processor type and OS
    • can be run without a translator present
  • Interpreter
    • translates and executes code line-by-line
    • stops and produces error if line contains an error
    • initially appears faster than compilers as code is instantly executed but is slower as code must be translated each times it's executed with an interpreter
    • makes interpreters useful for testing code and pinpointing errors
    • requires interpreter in order to run on different devices
    • code can be executed on a range of platforms with right interpreter
    • makes code more portable
  • Assembly Code
    • low-level language
    • the next step up from machine code
    • platform specific
    • instructions used are dependent on the instruction set of the processor
  • Assembler
    • translate assembly code into machine code
    • each line of assembly is equal to almost one line of machine
    • translated on an almost 1 to 1 basis
  • Stages of Compilation
    • lexical analysis
    • syntax analysis
    • code generation
    • optimisation
  • Lexical Analysis
    • first stage of compilation
    • whitespace and comments are removed from code
    • remaining code is checked for keywords/names of variables and constants
    • these are replaced with tokens and info about each is stored in a symbol table
  • Syntax Analysis
    • tokens are checked against grammar and rules of the programming language
    • tokens that break the rules are flagged as syntax errors and added to a list of errors
    • abstract syntax tree is produced
    • more detail about identifiers is added to symbol table
    • semantic analysis is carried out
  • Syntax Errors - Examples
    • undeclared variable type
    • incomplete set of brackets
  • Semantic Errors - Examples
    • multiple declaration
    • undeclared identifiers
  • Code Generation
    • produced in syntax analysis stage
    • used to produce machine code
  • Optimisation
    • searches through code for area that could be more efficient
    • aims to make code faster to execute but can add to overall time taken for compilation
    • redundant parts of code are detected and removed
    • repeated sections may be grouped and replaced with more efficient versions
    • excessive optimisation risks altering the way the program behaves
  • Linkers
    • software responsible for linking external modules and libraries in the code
  • Linkers - Types
    • static
    • dynamic
  • Static
    • modules/libraries are added directly to main file
    • this increases file size
    • updates externally will not affect program
    • because of this, a specific version of the library can be used
  • Dynamic
    • addresses of modules/libraries are included in file they're mentioned in
    • when program is run, loader retrieves program at the address so it can be executed
    • files remain small and they are affected by external updates
    • code does not need to be rewritten
  • Loaders
    • programs provided by OS
    • when file is executed, loader retrieves the library/subroutine from given memory location
  • Libraries
    • precompiled programs that can be added into other programs using static or dynamic linking
  • Libraries - Advantages
    • ready-to-use
    • error free
    • save time developing and testing modules
    • can be reused in multiple programs
    • use already developed functions to save programmers having to rewrite them