Chapter 5 | System Software

5.1 Operating Systems

Operating Systems →

An operating system provides an environment to run programs and acts as an interface to allow interaction with hardware.

Tasks of an OS →

Utility programs →

Might be provided by the OS or downloaded. Relatively small and only 1 purpose e.g. maintain, analyse, repair, configure system

Library Programs →

Libraries are pre-written modules - functions and routines - which perform common or complex tasks. Can be imported and then functions can be referenced in a program.

Pros Cons
  • Code already written and saves time
  • Code used by many people, thoroughly tested and likely to be error-free
  • Programmer can use mathematical or graphical functions they don’t know
  • Can be sure function will perform as it should and simplifies code
  • Conforms to industry standards and robust
  • Automatic updates improve routines
  • Compatibility issues, so libraries might not work with code or may need program to be changed
  • May not meet exact needs → unexpected results
  • Unexpected results/errors if routine is changed

Dynamic link library →

The Dynamic Link Library (DLL) consists of self-contained, pre-compiled routines that are only loaded into main memory at run-time and can be made available to several applications at once

Pros Cons
  • Same DLL file used in several programs at once, easing pressure on memory and saving memory space
  • Pre-written saving developer time
  • Pre-tested and reliable
  • Smaller executable file as it doesn’t contain routines
  • Only loaded into memory when needed
  • Changes are done independently and update automatically
  • External change to DLL could stop program working
  • DLL file must be present at run-time or error
  • Executable code isn’t self contained as DLL files must be linked at run-time
  • Appropriate linking software must be available at run-time to link DLL files

5.2 Language Translators

Languages →

High level language: Resembles natural english language & syntax. One line has many CPU instructions. Easy to understand but more time to execute Low-level language: Direct CPU access, but harder to write and understand Machine code: Consists of binary 1s and 0s. Directly executable and no translator. Rarely used by humans as it is impossible to read and understand

Translators →

Name When is it used How is it used Advantages Disadvantages
Interpreter

Used during development


Interpreter program, source code and data made available. Interpreter analyses and reads the first line. If an error is found, it is reported and the program stops. Otherwise, the line is converted to intermediate code and executed. This repeats for all lines


Stops at error, easier to debug as errors can be corrected in real-time
Can test part programs
No executable file, so more memory efficient


Greater time to execute
Source code not protected
Interpreter always needed to run
Compiler

Used when completed


Source code and compiler available. First line read and analysed. If an error is found, it is recorded. Else, the line is converted to intermediate code, and this repeats for the whole program. At the end, if errors are found, an error report is output, else the intermediate code is converted to object and executable file.


Produces an executable file, which can be shared without giving source code access. Faster to run Don’t need compiler at run-time and don’t need to re-compile


Longer analysis time.
More memory to link object code.
Harder to debug errors at end.
Can’t test part programs.
One error induces other false errors.
Won’t run with errors

Java →

Integrated Development Environments (IDEs) →

An Integrated Development Environment (IDE) is a software with features to edit programs, translate with interpreter or compiler, write code, and to debug and observe outputs

Features: