A Level · 1.2.1
Systems Software
Name
Class
Date
Mark / 31
Section A
Circle the letter of the correct answer. One mark each.
- 1What is the key difference between paging and segmentation?1
- APages are fixed size, segments are variable and follow logical program structure
- BSegments are fixed size and pages vary
- CPaging only applies to ROM
- DSegmentation is used only in embedded systems
- 2What is a page fault?1
- AMemory has run out entirely
- BA page table has been corrupted
- CA required page is not currently in physical memory
- DA page is written to twice
- 3Which scheduling algorithm can cause starvation of long processes?1
- ARound robin
- BFirst come first served
- CShortest job first
- DNone of them
- 4What is the convoy effect?1
- AProcesses migrate between priority queues
- BSeveral processes share a time slice
- CPages are swapped repeatedly
- DOne long process blocks all the shorter ones queued behind it
- 5Which scheduling algorithm is NOT pre-emptive?1
- ARound robin
- BShortest remaining time
- CFirst come first served
- DMulti level feedback queues
- 6What defines a real time operating system?1
- AIt shows the current time
- BIt guarantees a maximum response time
- CIt runs only one program
- DIt has the fastest processor
- 7What is the purpose of a device driver?1
- ATo defragment a disk
- BTo schedule processes
- CTo manage virtual memory
- DTo translate operating system instructions into commands for specific hardware
- 8What is the main advantage of intermediate code such as Java bytecode?1
- AThe same compiled code runs on any platform with a suitable virtual machine
- BIt requires no compiler
- CIt cannot contain errors
- DIt executes faster than native machine code
- 9During booting, what does the BIOS do first?1
- AInitialises device drivers
- BRuns a power on self test to check essential hardware
- CStarts the user interface
- DLoads the operating system kernel
- 10Round robin scheduling is best described as:1
- AThe most efficient possible algorithm
- BNon pre-emptive
- CPrioritising the shortest job
- DFair and responsive, giving each process an equal time slice
Section B
Answer in the space provided. The number of marks tells you how many separate points to make.
- 1ExplainExplain the difference between paging and segmentation.4
- 2DescribeDescribe how round robin scheduling works and state one advantage and one disadvantage.4
- 3ExplainExplain what is meant by a real time operating system and give an example of where one would be used.3
- 4ExplainExplain the advantages and disadvantages of using intermediate code executed by a virtual machine.5
- 5DescribeDescribe the sequence of events that occurs when a computer is switched on.5
Mark scheme
Section A
Section B
1 Explain the difference between paging and segmentation. 4
One mark for each of the following, to a maximum of 4.
- Pages are fixed size divisions of memory
- Segments are variable in size
- Paging is decided by the operating system regardless of program structure
- Segmentation follows the logical structure of the program such as functions or arrays
Model answer. Paging divides memory into fixed size blocks called pages, with physical memory divided into frames of exactly the same size, so any page can be placed in any free frame. The division is made by the operating system purely on the basis of size and takes no account of what the memory contains, which means a single function might be split across two pages. Segmentation instead divides memory into variable sized segments that correspond to the logical structure of the program, so one segment might hold a particular function, another an array and another the stack. Because segments vary in size, allocating and freeing them leaves gaps between them, producing external fragmentation, whereas paging produces internal fragmentation because the final page of an allocation is rarely completely full.
2 Describe how round robin scheduling works and state one advantage and one disadvantage. 4
One mark for each of the following, to a maximum of 4.
- Each process is given a fixed time slice or quantum
- When the slice expires the process is pre-empted and moved to the back of the queue
- Advantage: it is fair and gives good responsiveness for interactive processes
- Disadvantage: it ignores priority and urgency, and context switching adds overhead
Model answer. In round robin scheduling every ready process is placed in a queue and each is given the processor for a fixed period known as a time slice or quantum. When that slice expires the process is pre-empted, its state is saved, and it is moved to the back of the queue while the next process runs. The cycle continues so that every process receives processor time regularly. Its main advantage is fairness and responsiveness: no process can monopolise the processor and none can be starved, which makes an interactive system feel consistently responsive to user input. Its main disadvantage is that it takes no account of priority or urgency, so a critical process waits exactly as long as a trivial one, and the frequent context switching consumes processor time that does no useful work, which becomes significant if the quantum is set too short.
3 Explain what is meant by a real time operating system and give an example of where one would be used. 3
One mark for each of the following, to a maximum of 3.
- It guarantees a response within a defined maximum time
- A late response is treated as a failure even if it is correct
- Gives a valid example such as anti lock brakes, a pacemaker or industrial control
Model answer. A real time operating system is one that guarantees a response to an event within a defined maximum time, rather than merely aiming to be fast on average. The essential property is determinism: the worst case response time is known and bounded. In such a system a correct result delivered after the deadline counts as a failure, because the moment for acting has already passed. An anti lock braking system is a clear example: when a wheel locks, the controller must reduce brake pressure within milliseconds, and a decision arriving even slightly late is worthless because the vehicle has already skidded. Other examples include pacemakers, aircraft flight control systems and industrial machinery controllers.
4 Explain the advantages and disadvantages of using intermediate code executed by a virtual machine. 5
One mark for each of the following, to a maximum of 5.
- The source is compiled once into platform independent intermediate code
- The same code runs on any platform that has a suitable virtual machine
- This removes the need to compile separately for every target platform
- Execution is slower than native machine code because of the translation layer
- A virtual machine must be installed on the target system
Model answer. With intermediate code, the source is compiled once into a platform independent form such as Java bytecode rather than into the machine code of a particular processor. The main advantage is portability: the same compiled file will run on Windows, macOS, Linux or a mobile platform provided a suitable virtual machine is present, so the developer maintains and distributes one version rather than building and testing a separate binary for every target. This substantially reduces development and distribution effort, and it also allows the virtual machine to provide a controlled sandbox, which improves security. The principal disadvantage is performance. The virtual machine must translate the intermediate code to native instructions as the program runs, and this additional layer means execution is slower than equivalent natively compiled code, even with just in time compilation reducing the gap. There is also a dependency cost, since the appropriate virtual machine must be installed on the target system before the program will run at all, and the program cannot access platform specific hardware features directly.
5 Describe the sequence of events that occurs when a computer is switched on. 5
One mark for each of the following, to a maximum of 5.
- The processor begins executing firmware from a fixed address in ROM
- A power on self test checks that essential hardware is present and working
- The firmware identifies the boot device
- The bootstrap loader is loaded and run
- The operating system kernel is loaded into RAM and takes control
Model answer. When power is applied, the processor begins executing instructions from a fixed address which points into ROM, so the first code to run is firmware rather than anything on the disk. That firmware, the BIOS or UEFI, performs a power on self test which verifies that essential hardware such as memory, the processor and the display adapter are present and responding, halting with an error if anything critical fails. It then consults its configuration to determine the boot order and identifies the device to boot from. The bootstrap loader is read from that device into memory and executed, and its job is to locate and load the operating system kernel into RAM. Control is then transferred to the kernel, which initialises memory management, loads device drivers, starts system services and finally presents the user interface.