AQA A-Level Computer Science 7517
Fundamentals of Programming
Fundamentals of Data Structures
Fundamentals of Algorithms
Theory of Computation
Fundamentals of Data Representation
Fundamentals of Computer Systems
Fundamentals of Computer Organisation and Architecture
Fundamentals of Communication and Networking
Consequences of Uses of Computing
Systematic Approach to Problem Solving
Fundamentals of Databases
Big Data
Fundamentals of Computer Systems
Translators and the Role of the Operating System
- 2 things to know
- Paper 2
Overview
Recall questions on the functions of an assembler, a compiler and an interpreter, and on how an operating system shields users from the hardware.
What you need to know
Answer each one before you reveal it.
Explain how an operating system allocates input and output devices among competing processes.
Questions from this subtopic
Each one with the model answer underneath.
- 1
Give the function of an assembler in one sentence.
Model answer
An assembler translates a program written in assembly language into machine code, generally converting each mnemonic instruction into one machine code instruction.
- 2
Give the function of a compiler in one sentence.
Model answer
A compiler translates a complete high-level language program into machine code (or an intermediate code) in one operation before it is run, producing a separate file that can then be executed on its own.
- 3
Give the function of an interpreter in one sentence.
Model answer
An interpreter analyses and executes a high-level language program one statement at a time, translating and carrying out each statement as it is reached, without producing a separate executable file.
- 4
Explain what is meant by saying that an operating system shields programs and users from the physical detail of the machine.
Model answer
It means the awkward physical detail of the machine is dealt with once, by the operating system, so that every program above it sees a tidy and uniform machine instead. A program appending a line to a file issues a single request to save data; it never concerns itself with which tracks and sectors are free, what command codes this particular drive controller expects, how large a buffer to allocate, or what to do when the drive raises an interrupt to say it has finished. Replace the hard disk with a solid-state drive and the program is untouched, because only the operating system ever knew the difference. Without that layer, every application would have to be rewritten for every combination of hardware it might meet.
- 5
Give three examples of hardware complexity that an operating system hides from an application programmer.
Model answer
The physical layout of secondary storage: the programmer sees named files in folders, not tracks, sectors and block addresses. The differences between devices: the same print or save instruction works with any make of printer or disk because the operating system uses the appropriate driver. The physical position of a program in memory: the programmer uses addresses within their own program and the operating system maps them to real locations. Also hidden are interrupt handling, buffering between fast and slow devices, and the detail of network protocols.
- 6
What is the benefit to a programmer of the operating system hiding hardware complexity?
Model answer
The programmer can write shorter, simpler programs and concentrate on the user's problem instead of the machine. The same program will run on many different physical configurations without change, which makes software portable. It also prevents mistakes: low-level device control is easy to get wrong, and doing it once inside the operating system is safer than doing it in every application.
Other ways to work this
The same content, four other ways.
What is inside Levo
Six ways to work the same material.
Every question in Fundamentals of Computer Systems, on a schedule.
Attempt a question from memory, write the correct version, then attempt it again. Levo records the jump between your first attempt and your last, and brings each question back on the day you are due to forget it.
Or £46 a year, about £3.83 a month. Cancel anytime.