Software and Programming Languages
System software against application software, the four jobs of an operating system, utilities, and how high and low level languages are translated into something a processor can run.
System and application software
System software manages the computer itself and includes the operating system and utility programs. Application software lets a user carry out a particular task: a browser, a word processor, a game.
The test is purpose. Application software serves the user's job. System software serves the machine, so that application software can run at all.
What an operating system does
Processor management. Decides which process gets the processor and for how long, switching between them fast enough that they appear to run at once.
Memory management. Allocates memory to each running program and keeps them out of one another's memory, moving less used pages to virtual memory on the drive when physical memory runs out.
Peripheral and device management. Communicates with input and output devices through device drivers, so an application can say "print this" without knowing anything about the specific printer.
User management and security. Handles accounts, logins and permissions, so different users have different files and different rights on one machine.
It also provides the user interface, graphical or command line, through which everything else is reached.
Say what is managed and what would go wrong without it. "Memory management stops one program writing into another program's memory, which would crash it" is the complete answer.
- The hardware at the bottom: the parts you could drop on your foot.
- The operating system sits on it and manages all of it for you.
- Utility software does the housekeeping jobs around the system.
- Your applications sit on top and never touch the hardware directly.
- That is why a program written once runs on very different machines.
- The operating system sits between the applications and the hardware, so a program never has to deal with the hardware directly.
- It shares out the computer's resources: memory, processor time and storage.
- It also talks to devices through drivers, keeps the system secure and provides the user interface.
Utility software
Utility software performs maintenance and housekeeping. It is system software, but it is not part of the operating system's core job.
| Utility | Purpose |
|---|---|
| Backup | Copies files to a separate location so they can be restored after loss, failure or ransomware |
| Anti-malware | Scans for and removes malicious software before it runs |
| Encryption | Scrambles data so it is unreadable without the key |
| Compression | Reduces file sizes to save storage and transmission time |
| Defragmentation | Rearranges the parts of files on a mechanical drive so each file is stored together |
| Disk clean up | Removes temporary and unnecessary files to reclaim space |
A solid state drive reaches every location in the same time, so gathering files together gains nothing, and the very large number of writes involved shortens the drive's life.
- Antivirus finds and removes malware.
- A firewall blocks unwanted traffic and lets allowed traffic through.
- Defragmentation puts each file's pieces next to each other, which speeds up a hard disk.
- Compression makes files smaller so they use less storage and send faster.
- Backup keeps a second copy of your files in case the originals are lost.
- Encryption scrambles data so that only someone with the key can read it.
Programming languages and translators
High and low level
A high level language such as Python is written close to human language. One statement usually becomes many machine instructions, which is why it is quick to write and easy to read, and why it runs on any machine that has a translator for it.
A low level language is close to the hardware. Machine code is the binary the processor executes. Assembly language replaces those binary opcodes with mnemonics such as ADD and LDA, roughly one mnemonic per machine instruction.
| High level | Low level | |
|---|---|---|
| Readability | Close to English | Difficult |
| Portability | Runs anywhere with a translator | Written for one processor |
| Speed of development | Fast | Slow |
| Control of hardware | Indirect | Complete |
| Memory management | Handled for you | The programmer's job |
Low level languages are still used for device drivers, for embedded systems with very little memory, and for small routines where the last few per cent of speed genuinely matters.
Translators
A processor executes machine code and nothing else, so anything else must be translated.
An assembler translates assembly language into machine code, roughly one instruction at a time.
A compiler translates a whole high level program into machine code before it is run, producing an executable file.
- The finished program runs quickly, because translation has already happened.
- It can be distributed without the source code.
- No translator is needed on the machine that runs it.
- All errors are reported together at the end of compilation.
- The executable only runs on the platform it was compiled for.
An interpreter translates and executes one statement at a time, every time the program is run.
- Errors are reported as soon as the offending line is reached, which makes debugging far quicker.
- The same source runs anywhere the right interpreter exists.
- Execution is slower, because translation happens on every run and every time round a loop.
- The source code must be given to whoever runs it.
Interpreters win while you are writing the program. Compilers win once it is finished. Answers that keep those two situations apart get full marks.
- High-level: English-like, portable, one line becomes many instructions.
- Assembly: one short code per instruction, tied to one processor.
- Machine code: binary, the only thing the processor runs.
- The same sum at each level. A translator turns the top into the bottom.
- Compiler: translates everything first, then the program runs fast and the source stays private.
- Interpreter: translates and runs one line at a time, so it is easy to test and stops at the first error.
- Assembler: turns assembly into machine code, one line for one instruction.
Key terms you must be able to define
- System software
- Software that manages the computer itself, including the operating system and utilities.
- Application software
- Software that lets the user carry out a particular task.
- Operating system
- System software managing the processor, memory, peripherals and users, and providing the interface.
- Device driver
- Software allowing the operating system to communicate with a particular hardware device.
- Utility software
- System software carrying out maintenance tasks such as backup, encryption or compression.
- High level language
- A language written close to human language, where one statement becomes many machine instructions.
- Low level language
- A language close to the hardware, either machine code or assembly language.
- Assembler
- A translator converting assembly language into machine code.
- Compiler
- A translator converting a whole high level program into machine code before it runs.
- Interpreter
- A translator converting and executing a high level program one statement at a time.
Flashcards
Say the definition out loud before you flip the card. Retrieving it from memory is what builds recall, reading it again is not.
Reach the top grade on this topic
Two habits earn the top marks on this topic.
Explain a function by its consequence. Memory management stops one program corrupting another. Device drivers mean an application need not know which printer is attached. Naming the outcome is what distinguishes a developed point.
Separate development from execution when comparing translators. "An interpreter is slower" is incomplete. "An interpreter is slower to execute because it translates each line every time it is run, but faster to develop with because it reports an error as soon as it reaches the line containing it" is the answer.
Mistakes that cost marks here
- Calling a device driver hardware. It is software.
- Saying a compiler is simply faster than an interpreter without saying at what.
- Describing assembly language as machine code. It uses mnemonics and still needs assembling.
- Saying utilities are application software. They maintain the machine, so they are system software.
- Claiming defragmentation speeds up a solid state drive.
The first compiler was written in 1952 by Grace Hopper, who was told repeatedly that computers could not understand English-like instructions. Every high level language since exists because she was right and they were wrong.
Knowledge check
Exam-style questions
Five written questions in the style of the real paper. Write a full answer, then let the marker check it against the mark scheme.
- LSystem software manages or maintains the computer itself
- LApplication software allows the user to complete a particular task
System software manages and maintains the computer itself, the operating system and utility programs being the main examples. Application software is installed so that the user can carry out a particular task such as browsing the web or editing a photograph.
- LMemory management, allocating memory to each running program
- LExplains the consequence, such as preventing programs interfering with each other
- LPeripheral management, communicating with devices through drivers
- LExplains the consequence, such as applications not needing to know the specific hardware
The first is memory management. The operating system allocates an area of memory to each running program and keeps track of what is in use, which prevents one program from writing into memory belonging to another and crashing it, and it moves less used pages out to virtual memory when physical memory runs short. The second is peripheral management. The operating system communicates with input and output devices through device drivers, so an application can simply request that a page is printed without containing any knowledge of the particular printer attached, and a new device is supported by installing a driver rather than by rewriting every program.
- LAn interpreter reports an error as soon as it reaches the line containing it
- LWhich makes locating and fixing faults during development much quicker
- LA compiler translates the whole program once before it runs
- LSo the finished program executes faster, and can be distributed without the source code
An interpreter translates and executes one statement at a time, so when it reaches a line it cannot process it stops there and reports it. That tells the programmer precisely where the fault is and allows an immediate retry after a change, with no compilation step in between, which makes the write, test and correct cycle much faster while a program is still being developed. A compiler translates the entire program into machine code once, before it is ever run. At run time the processor executes machine code directly with no translation happening at all, so the finished program is considerably faster, and it can be distributed as an executable without the source code, which protects the developer's work and means the user needs no translator installed.
- LA low level language gives direct control over memory and hardware
- LThe code can be made extremely compact, using far fewer bytes
- LAcknowledges the cost, that it is slow to write and not portable
A low level language lets the programmer decide exactly how every byte of memory is used and exactly which instructions the processor executes, rather than leaving those decisions to a compiler making general purpose choices. With only 32 kilobytes available that control is what makes the program fit at all, since the equivalent high level program would very likely be several times larger. The cost is real: low level code takes far longer to write, is much harder to read and debug, and is written for one specific processor, so it cannot be recompiled for different hardware later. For that reason a company would usually write only the memory critical or timing critical routines this way and keep the rest of the program in a high level language.