A games developer writes a program that saves files and plays sound. The program never refers to the specific hard drive model or sound card in the computer it runs on.
(a) Explain how the operating system makes this possible. [2]
(b) Identify the function of the operating system that is being performed in each of the following situations.
(i) A user is refused access to a folder owned by another user. [1]
(ii) A school network records how many pages each student prints so that they can be charged. [1]
- (a) The OS provides an abstraction layer / hides the hardware details by offering standard system calls / APIs (e.g. 'open file', 'play sound') that programs use;(1)
- the OS (through device drivers) translates these general requests into the specific instructions for that particular hardware, so the same program works on different hardware (accept: the OS manages the hardware on the program's behalf)(1)
- (b)(i) Security (accept: access control / user permissions / authentication; reject 'file system' alone)(1)
- (b)(ii) Accounting (accept: resource usage tracking / logging use of resources; reject 'device management' alone)(1)
- Answer: (a) The OS hides hardware detail behind standard system calls; drivers convert them to device-specific commands. (b)(i) Security (ii) Accounting.
- Examiner tip: 'The OS controls the hardware' scores nothing on its own; say that programs call a standard interface and the OS/drivers translate it for the specific device.