System Software: Question 3
Syllabus 5.1
Riverbank College's library has a single shared computer that runs a multitasking operating system.
One afternoon, a student called Elif logs in and opens a web browser, a word processor and a spreadsheet program all at the same time, switching between them as she researches and writes a report. While she is working, another student, Tom, sends a document to print on the library's single shared laser printer; less than a minute later, Elif also sends a different document to the same printer.
(a) Explain how the operating system's management of memory allows Elif's web browser, word processor and spreadsheet to all be open and running at the same time, without the data belonging to one program being corrupted by another program. [2]
(b) The computer's processor can only actually execute instructions from one program at any single instant. Explain how the operating system's management of processes still allows Elif's three open programs to all appear to be running continuously at the same time. [2]
(c) Tom's and Elif's documents are sent to the same printer only a minute apart. Explain how the operating system's management of this peripheral device makes sure both documents are printed in full, rather than being merged together or one of them lost. [2]
(d) State one way in which the operating system's user interface hides the technical, hardware-level detail of the library computer from Elif and Tom as they use it. [2]
Show worked solution Hide worked solution
Worked solution
Part (a): Memory management
The operating system’s memory management keeps track of which areas of main memory are currently free, and which are already in use. When Elif opens the web browser, word processor and spreadsheet, the operating system allocates each program its own separate area of memory to run in. Crucially, it also protects each of these memory areas: one program is prevented from reading or overwriting the memory being used by another program. This is what allows all three programs to run at the same time without one of them accidentally corrupting another’s data. [2 marks]: [1] for allocating a separate area of memory to each program, [1] for explaining that the operating system also keeps this memory separate/protected between programs.
Part (b): Process management
A processor can genuinely only execute instructions from one program at any single instant. Multitasking is achieved because the operating system’s process management repeatedly switches the processor’s attention between the running processes, giving Elif’s web browser a short turn, then her word processor, then her spreadsheet, and back again, many times every second. Because these switches happen so quickly, each program appears to the user to be running continuously and simultaneously, even though the processor is really only ever working on one of them at a time. [2 marks]: [1] for stating that the operating system switches the processor’s attention between the processes, [1] for explaining that this switching happens fast enough that each program appears to run continuously.
Part (c): Peripheral (printer) management
Rather than sending each document straight to the printer as soon as it is requested, the operating system’s management of this shared peripheral places each print job into a queue, a process usually called spooling. Tom’s document is added to the queue first; when Elif’s document is sent a minute later, it is added to the same queue behind Tom’s. The operating system then sends the queued jobs to the printer one at a time, in the order in which they were received, so Tom’s document is printed first and in full, followed by Elif’s document, rather than the printer receiving both at once and merging them, or one of them being lost. [2 marks]: [1] for identifying that the print jobs are placed in a queue (spooled), [1] for explaining that the queued jobs are sent to the printer one at a time, in the order received.
Part (d): The user interface hides hardware complexity
The operating system’s user interface (for example, a graphical interface with icons, windows and menus) allows Elif and Tom to start tasks, such as opening a program or printing a document, by simply clicking on an icon or choosing a menu option. Neither student needs to know anything about how the hardware actually works underneath, such as the specific commands needed to control the printer or how data physically reaches it; the operating system and its device drivers handle all of that low-level detail on their behalf.
Final answers
- (a) The operating system allocates each program a separate, protected area of memory, so their data cannot be corrupted by each other.
- (b) The operating system rapidly switches the processor between the three processes, so each one appears to run continuously.
- (c) The operating system queues (spools) the print jobs and sends them to the printer one at a time, in the order received.
- (d) The user interface lets a task (e.g. printing) be started with an icon/menu click, without the user needing to know low-level hardware detail.