Systems Software Flashcards
Open source software (governed by open source initiative)
Software is LICENSED for use but there’s no charge for the license
Software should be distributed with the source code so anyone can modify
Any software created from open source must also be open. Should be distributed/sold in a way that others can read and edit it
Developers can sell software created
How is open source different from freeware
Restrictions on use and no access to source code
Closed software (proprietary)
Sold in the form of a license to use it.
Restrictions on how software can be used e.g. Only allows one concurrent user or permit 50 users on one site
Company or person who wrote it holds copyright. No access to source code or modify and sell it on as infringes CDPA
How to select application
Provide necessary functionality? Run on available hardware? Available off the shelf or need to be specially written? Cost? Is it well tried used and tested?
Assembly code
Low level language thats ARCHITECTURE dependent and usually one instruction is equivalent to one machine code instruction . They’re 2-4 character mnemonics representing all machine code instructions and representing operation codes and addresses. (opcodes and operands)
Machine code and assembly code in different machines
Completely dependent on hardware- different PROCESSORS have different machine code instruction set and different architectures have different assembly codes
Assembler
Translates assembly code (aka source code) to corresponding machine code (object code). Each line is converted to corresponding 0 and 1s
Compiler
Different compilers for hardware specific object code.
Translates high level language to machine code. The source code is INPUTTED AS DATA and compiler scans through it several times, performing different checks and building up tables of information needed to build final object code as a whole.
This object code can then be SAVED and run whenever without the compiler
Interpreters
Translates high level language to machine code. Written and saved program, interpreter looks at each individual line and analyses, translates and executes it if no syntax errors
Bytecode
An intermediate representation, simplified code, combining compiling and interpreting- executed by a bytecode interpreter
It can be compiled into bytecode once and for all e.g. Java or each time a change in the source code is detected e.g. Python
What’s so good about bytecode
Achieve platform independence: any computer which can run java programs will have a java VM ( a piece of software) which a) understands bytecode and converts it to machine code for a particular computer b)is a software masking inherent differences between computer architectures and OS
Acts a an extra security layer between computer and program: java bytecode interpreter is executed instead of program, guarding against malicious programs
Secure: can distribute whilst protecting intellectual property
Error free when interpreted
Original code can be written in different languages by different programmers
Java interpreter for python
Compile python to java bytecode via jython compiler and using Java interpreter to interpret and execute
When use compiler
When program to be run regularly with only occasional changes.
When object code produced is going to be distributed and sold outside software company bc software code not present so can’t be amended or copied
Advantages of compiler vs interpreter
Errors presented all in one go at start
Can save object code on disk so can run whenever with no need to recompile (unless one error found then recompile all)
Object code can be distributed and executed without compiler present
More secure and protects intellectual property as can’t be read without great deal of reverse engineering
Executes faster than interpreted code
Advantages interpreter vs compiler
Platform independence: source code can be run on any machine with appropriate interpreter available
Useful for program development where no lengthy recompilation each time error discovered
More secure byte code rather than source code
Interpreter disadv
Compiler disadv
Much slower than compiled because each statement translated to machine code each time encountered
errors not presented at start altogether
compiler- diff versions for diff hardware
slow recompilation if error found
e.g. C++ where compiled
Can save compiled code and run whenever
Protected intellectual property- don’t need to give away source code just object code
Need different versions for different hardware
(lengthy recompilation if one error during development)
e.g. Java where interpreted
Can be run one any hardware w VM, platform independence
Security: gives intermediate code rather than source code bc java
(no lengthy recompilation during development)
Longer time to interpret line by line
E.g. Javascript interpreted using browser
Any access to internet can interpret
Takes longer to interpret: pure interpreting
Not really closed because source code available
systems software
software needed to run computer’s HARDWARE and APPLICATION PROGRAMS and to be able to perform TASKS as requested by the user e.g. OS, utility programs, libraries and programming language translators
OS function e.g. UI
enables users to perform tasks e.g. running application software, changing settings and downloading new software
utility programs
system software designed to optimise the performance of a computer by e.g. compressing/decompressing, firewall, backing up files and restoring backup-ed files
UP: backup
several free for COMMERCIAL or personal use. specify what (source) to backup, where (destination) to backup, when (schedule auto/manual), how (zip or mirror backup). done INCREMENTALLY, at regular intervals
UP: compression
can be purchased from independent supplier e.g. WinZip, quicker transmission speeds and to reduce space in hard disk or for email by compressing and zipping files then sharing and DECOMPRESS on other side
UP: virus checker
checks hard drive (and perhaps incoming emails and downloads depending on level of protection) for viruses, and removes them e.g. Windows Defender, also stops files being sent INFECTING other systems
UP: auto updating
auto checks to see if installed applications are up to date. checks internet, if newer version then downloads and installs. important for firewall and antivirus as new viruses and threats constantly being devised and discovered. also for bug fixes and improvements for licensed software
UP: disk defragmenter
program that reorganises the magnetic hard disk so that files split into blocks stored all over the disk will be RECOMBINED in a single series of sequential blocks so QUICKER to read file. e.g. Optimise drives- weekly auto schedule in latest Windows version
Applications software: general purpose
used for many different purposes e.g. graphics package (ads, animations, vector or bitmapped images), word processor, spreadsheet, browser
Applications software: special purpose software
performs a single specific task or set of tasks e.g. payroll and accounts, hotel booking systems, finger scanning
off the shelf adv and disadv
cheap because cost is shared among all those buying the package
wide user base support
lots of choice
ready to install immediately
well documented, tested and error free
may have some unnecessary features and lack some desired features, not meeting all clients needs
no access to original developers
bespoke adv and disadv
more costly and requires expertise to analyse document requirements
takes a long time to develop
may contain errors that don’t surface immediately
features customised to user requirements and other features added as needs arise
proprietary software adv
support available from company, regular updates, technical support lines, training courses, large user base vs open source: changing over time as developers modify and distribute new versions, just enthusiastic developers, no regular updates or helpline
application software
**perform a specific set of tasks
advantages of low level language e.g. assembly code and uses
can manipulate individual bits, takes up less memory, quicker to execute. e.g. embedded- where little memory used e.g. smart watch
advantages of high level language e.g. python and uses
quicker and easier to write, easier to debug and maintain e.g. application software e.g. enrolment, accounts, stock control
fewer lines of code than machine code
can include libraries
error diagnostics
can be translated/compiled into machine code of different architectures
original coding
machine code: done in binary codes- 1 and 0s
altering the flow of an assembly language program
using conditional branches: BRZ and BRP: causing a branch to a GIVEN LABEL in the program depending on the CONTENTS of the accumulator
using unconditional branches: cause a branch whatever the value in the accumulator
stages of compilation
lexical analysis, syntax analysis, code generation and optimisation
stages of lexical analysis
purpose: makes it easier to do syntax analysis and compile into machine code as makes source code consistent and standardised.
1. superfluous spaces removed
2. comments removed (identified by //, #)
3. simple error checking eg illegal identifier or assigning illegal value to constant (of wrong data type/causing overflow or underflow) NOT DETECT MISSPELT KEY WORDS OR UNDECLARED VARIABLES = syntax analyser
4. all keywords, constants and identifiers used in source code replaced by tokens/unique symbols eg numbers converted to run time representation and identifier replaced by a pointer to an address in the symbol table. Keywords eg input/print will be replaced by a single item code
symbol table
contains an entry for every keyword eg ‘input’ ‘print’ and identifier. entries in table show: above and kind of item (variable/array/procedure/keyword), type of item (integer/real/char), run-time address of item/value if constant, pointer to accessing info (eg bounds of array or parameter info for procedures)
lexical analyser and symbol table
lexical analyser puts identifier and run time address in symbol table so it can replace them in the source code by tokens
syntax analyser and symbol table
fills in kind of item and type of item
what has a great impact of overall speed of compiler
the lexical analyser looking up the symbol- as a great proportion of time is spent doing this
great factor to ensure entries can be found as quickly as possible in the symbol table
the symbol table is organised through a hash table normally: keywords/identifiers ‘hashed’ to produce an array subscript
hash table problem and overcoming this
synonyms (collisions) are inevitable so store synonym in next available free space in table
what is syntax analysis
the process of determining whether the sequence of input characters, symbols, items or tokens form a valid sentence in the language. To do this, language has to be expressed through set of rules eg using syntax diagrms/backus-naur form
process of syntax analysis:
- parsing- systematically applying set of rules to each statement to determine if valid
- stacks used to check eg brackets paired correctly
- priorities of operations determined
- expressions converted into a form eg reverse polish notation, from which machine code can be more easily generated
- semantics of program checked: semantics define meaning rather than grammar of language if statements don’t obey rules for writing a correct program
- error messages outputted
eg of symantic errors
use of undeclared variable
trying to assign a real value to an integer variable
using real number instead of integer for counter in for…next loop
code generation and optimisation
final phase when machine code is generated: most high level language statements translated into a number of machine code statements
code optimisation techniques attempt to:
reduce execution time of the object program by spotting redundant instructions and then producing object code achieving the same net effect as specified by source program but by diff means
disadvantages code optimisation
increase compilation time
produce unexpected results
off the shelf software
software that already exists and can be purchased
bespoke software
software specially written by a team of programmers for a particular organisation satisfying their particular requirements
linking
puts the appropriate machine addresses in the external call and return instructions so all the modules are linked together correctly
dynamic linking
all separately compiled subroutines need to be linked into the object code. Includes built in routines or routines written by the programmer and stored on disk in a library of subroutines
static linking
all the code required is included directly into the finished compiled code = large
loader
loads the programs into memory for use. a relocating loader can load the object code anywhere in memory providing the user has used no absolute addresses and the object code is in a relocatable format
libraries
ready-compiled programs which can be run when needed, and are grouped together in software libraries. e.g. user’s own library, dll, programming language