A device driver is software that allows the operating system to control a piece of hardware. Device drivers are often written in a low-level programming language.
Describe one reason why a low-level programming language is suitable for writing a device driver.
Mark scheme
Award up to two marks for a linked description such as:
- Instructions can manipulate/control the hardware/memory/registers directly (1) so the driver can control the specific device it is written for (1)
- The code is written for one specific processor/architecture (1) so it works with the exact hardware it will control (1)
- The programmer controls exactly how memory/registers are used (1) so the code is efficient and needs little memory, which suits a device that has limited memory (1)
- Each instruction maps to one machine code instruction (1) so the driver code is small enough to fit in the memory of the device (1)
Extra detail, such as naming the device the driver controls, is not needed to earn the marks.
Do not accept 'it is closer to machine code' on its own: it must be developed to show how this helps the driver, e.g. it can control the hardware directly.
Do not accept 'it is faster/quicker' with no link to the hardware/device, e.g. the device responds quickly.
Do not accept 'it is easier to learn', 'it is easier to debug' or 'it takes less time to write'.
Example answers and how they were marked
Low-level instructions can manipulate the hardware and memory directly (1) so the driver can control the specific device it was written for, such as a sound card (1).
Why: Point about direct control of hardware/memory (1) linked to controlling the specific device (1). The named device is extra detail and is not needed.
Low-level instructions can manipulate the hardware directly.
Why: Correct point (1) but no linked development saying how this helps the device driver.
It is closer to machine code so it runs faster than a high-level language.
Why: 'Closer to machine code' is not developed into how this helps the driver, and 'runs faster' is not linked to the hardware/device, so no mark.