4 Software

    Cards (21)

    • System software

      Provides services required by computer e.g OS, utility software (antivirus,firewall)
    • Application software

      Provides services required by user e.g word processor, browser, video editing software
    • Purpose/role of OS
      • Perform basic functions of computer
      • Manage hardware
      • Provide a user interface
      • Provide a platform for running/install/remove applications
    • Tasks/functions of OS
      • Establish communication between user and the computer
      • Manage files; opening, deleting, rename, create
      • Handle interrupts/errors
      • Manage peripherals and drivers
      • Manage memory - manage RAM and HDD/SSD during program execution, manage movement of data to/from RAM, manage transfer of pages between virtual memory and RAM, managing multitasking/timeslicing, share hardware resources/memory with each of the processes
      • Provide system security - manage access levels, antivirus, system updates
      • Manage user accounts - allow multiple users to customise acc individually
    • Role of interrupts
      • OS stop current process; service interrupt task
      • Prioritising actions/efficient processing/use of hardware
      • Allow multitasking
      • Generate output msg to state error
    • How interrupts are generated
      • Software interrupts: division by zero, two processes trying to access the same memory location, phone call received, switching applications
      • Hardware interrupts: pressing a key on the keyboard, moving the mouse, peripheral disconnected, printer paper jam/runout paper/ink
    • How interrupts are handled (interrupt service routine)
      1. When software/hardware detect interrupt signal, send it to CPU
      2. CPU copies current instructions in registers to primary memory area 'stack'
      3. Interrupt is given priority and queued
      4. If interrupt has higher priority than current task, CPU execute ISR
      5. ISR finished, registers loaded with original instructions from stack to continue original program
    • High level programming language

      Closer to english-like statements
    • Pros of high level programming language
      • Easy to debug, read, write (faster) -> less error prone
      • Independent of the type of computer used -> portable, not specific to computers hardware
    • Cons of high level programming language
      • Can't directly manipulate
      • Program less efficient/larger, needs to be translated to machine code before running -> take longer to execute
    • Low level programming language

      Close to computer's instruction set/language processed by computers, may use mnemonics, e.g machine code, assembly
    • Pros of low level programming language

      • Gives programmers direct manipulation/control of hardware/system components
      • Memory Efficient code/program can be written; occupy less primary memory
      • Execute faster
      • No requirement for program to be portable
      • No require compiler/interpreter
      • Can use specialised hardware
    • Cons of low level programming language
      • Hard to read/write/debug -> error prone
      • Machine dependent - can't be added to diff specification machines
    • Why a programmer should choose high level programming language
      • Easy write -> less likely to make mistake / faster
      • Easy debug -> correct errors in less time
      • machine independent -> portable between hardware -> used on any computer without understanding hardware
      • focus on problem instead of manipulation of hardware
    • Why a programmer should choose low level programming language
      • Memory efficient -> 3D graphics will have high memory consumption anyway
      • Allow direct manipulation of memory -> more efficient control/response time
      • Allow use specialised hardware
    • Compiler
      • before execute, Translate whole code -> executable file
      • After try compile -> error report, display all errors in code that require correction before execution. Won't execute
      • final program -> distribute for general use
      • Executable file wouldn't release source code/can't be stolen/editted,
      • user translator software not required | compiled run w/o compiler -> machine independent
      • Single report -> can be fixed at same time
      • No need to recompile code every time a test is run
    • Interpreter
      • Translates and executes the high-level code one statement/line at time
      • Stops execution when an error is found, report error
      • Used when developing program
      • Easier to debug: correct errors in runtime/real time (when corrected program can be run from same position)
      • Errors immediately reported when detected and stop execute
      • Can test one section w/o rest of code being completed
      • Interpreted programs can't run w/o interpreter (need to execute source code)
    • Assembler
      • Assembles assembly language (low-level language, uses mnemonics) program -> machine code to run
      • Produce executable file
    • Common functions of an IDE (Integrated Development Environment)
      • Code editors
      • Run-time environment
      • Translators - built-in compiler/interpreter
      • Error diagnostics
      • Auto-completion
      • Auto-correction
      • Prettyprint
    • hardware + firmware + os = run app
      2. BIOS (basic i/o system, firmware) tells computer the OS/initial bootup instruction's storage location in ROM.
      3. comp explore ROM
      4. sent to RAM -> comp start OS -> OS run app

      BIOS loads bootstrap loader (program that starts up OS)
      1. hardware run bootloader (firmware)
      2. firmware run OS
      3. OS run app
    See similar decks