OCR H446/01 style 80 minutes 75 marks Original paper

A Level Computer Science Paper 1: Computer Systems

An original paper in the style of H446/01, covering processors, software and development, exchanging data, data types and structures, and legal and ethical issues.

Exam timer

Sit this to the clock. Working under time pressure is a separate skill from knowing the content, and it is the one most students never practise.

00:00

Instructions

  • Answer every question.
  • The marks tell you how many creditworthy points are wanted.
  • No calculator is permitted.
  • The extended response questions are levels marked, so structure, balance and a supported conclusion matter as much as the content. Use precise technical vocabulary, because a single correct term communicates more than a paragraph of description.

Questions

Write a full answer to every question, then mark the whole paper at the end. Marking as you go teaches you far less.

75 marks
1Describe the role of the Current Instruction Register and the status register within the processor.4 marks

Mark scheme0 / 4
  • LThe CIR holds the instruction currently being decoded and executed
  • LThe instruction is copied into it from the MDR, freeing the MDR for data
  • LThe status register holds flags set by the last operation
  • LSuch as zero, negative, carry and overflow, used by conditional branches
Model answer

The Current Instruction Register holds the instruction that the processor is currently decoding and executing. During the fetch stage the instruction arrives from memory into the Memory Data Register and is then copied into the CIR, which frees the MDR to carry any data that the instruction subsequently requires. The status register holds a set of flags that are updated by each operation the ALU performs, including the zero flag when a result is zero, the negative flag when it is negative, and the carry and overflow flags when an arithmetic operation exceeds the available bits. These flags are what conditional branch instructions test in order to decide whether to jump.

The marker looks for key phrases. If you said it another way and it is still right, give yourself the mark.
2Explain how pipelining increases the throughput of a processor and describe the effect of a conditional branch.5 marks

Mark scheme0 / 5
  • LInstruction processing is divided into stages such as fetch, decode and execute
  • LDifferent instructions occupy different stages simultaneously
  • LThroughput approaches one instruction completed per cycle once the pipeline is full
  • LA taken branch means the instructions already fetched are the wrong ones
  • LThe pipeline is flushed and refilled, wasting the work already done
Model answer

Pipelining divides the processing of an instruction into separate stages, typically fetch, decode and execute, and allows different instructions to occupy different stages at the same time. While one instruction is being executed, the next is being decoded and a third is being fetched, so although each individual instruction still takes three cycles to pass through, one instruction completes on every cycle once the pipeline is full, roughly tripling throughput without any increase in clock speed. A conditional branch disrupts this. The processor has already fetched and begun decoding the instructions that follow sequentially in memory, but if the branch is taken then execution should continue from somewhere else entirely, so those instructions are not the correct ones. The pipeline must be flushed, discarding the partly processed instructions, and refilled from the branch target, which wastes several cycles. Branch prediction reduces the cost by guessing the likely outcome from previous behaviour and speculatively filling the pipeline accordingly.

The marker looks for key phrases. If you said it another way and it is still right, give yourself the mark.
3Compare RISC and CISC architectures, and explain why RISC is dominant in mobile devices.6 marks

Mark scheme0 / 6
  • LRISC has a small instruction set of simple fixed length instructions
  • LCISC has a large instruction set with complex variable length instructions
  • LRISC instructions usually complete in one cycle while CISC take several
  • LMore instructions are needed per task in RISC, but complexity moves to the compiler
  • LUniform instructions make RISC far easier to pipeline effectively
  • LSimpler hardware consumes less power, which is decisive for battery powered devices
Model answer

A RISC processor uses a small instruction set of simple instructions that are of fixed length and typically execute in a single clock cycle, whereas a CISC processor uses a large instruction set containing complex, powerful instructions of variable length that may take several cycles each. This produces a fundamental trade off in where complexity is placed. A CISC program needs fewer instructions to accomplish a given task, because one instruction may perform work that would take several in RISC, and that complexity is built into the hardware, often implemented internally using microcode. A RISC program needs more instructions, and the compiler must therefore be considerably more sophisticated in order to construct complex operations from simple ones, so the complexity moves into software. RISC is dominant in mobile devices for two connected reasons. First, its instructions are uniform in length and duration, which makes them exceptionally well suited to pipelining, so despite each instruction doing less work the processor sustains high throughput. Second, and decisively, simpler hardware requires fewer transistors and draws substantially less power per instruction executed, which directly determines battery life and also means less heat is generated, an essential consideration in a thin sealed device with no fan.

The marker looks for key phrases. If you said it another way and it is still right, give yourself the mark.
4Explain the difference between paging and segmentation in memory management.4 marks

Mark scheme0 / 4
  • LPaging divides memory into fixed size pages mapped to equally sized frames
  • LSegmentation divides memory into variable sized segments
  • LPaging is decided by the operating system regardless of program structure
  • LSegmentation 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 identical size, so any page may be placed in any free frame and a page table records the mapping. The division is made by the operating system purely on the basis of size and takes no account of what the memory contains, so a single function may be split across a page boundary. Segmentation instead divides memory into variable sized segments that correspond to the logical structure of the program, so one segment may hold a particular procedure, another an array and another the stack. Because segments vary in size, allocating and releasing them leaves gaps of differing sizes between them, producing external fragmentation, whereas paging produces internal fragmentation because the last page of any allocation is rarely completely full.

The marker looks for key phrases. If you said it another way and it is still right, give yourself the mark.
5Describe two scheduling algorithms used by an operating system, giving a strength and a weakness of each.6 marks

Mark scheme0 / 6
  • LRound robin gives each process a fixed time slice in turn
  • LStrength: it is fair and responsive with no starvation
  • LWeakness: it ignores priority and context switching adds overhead
  • LShortest job first runs the process with the shortest total time next
  • LStrength: it gives the best average waiting time
  • LWeakness: it can starve long processes and requires run times to be known in advance
Model answer

Round robin scheduling places every ready process in a queue and gives each the processor for a fixed time slice before pre-empting it and moving it to the back of the queue. Its strength is fairness and responsiveness: every process receives processor time regularly, none can be starved and none can monopolise the processor, which makes an interactive system feel consistently responsive. Its weakness is that it takes no account of priority or urgency, so a time critical process waits exactly as long as a trivial one, and the frequent context switching consumes processor time that does no useful work. Shortest job first selects the process with the shortest total execution time to run next. Its strength is that it produces the lowest possible average waiting time, because completing many short jobs quickly reduces the total time processes spend waiting. Its weaknesses are significant, however: it requires the run time of each process to be known or estimated in advance, which is often unrealistic, and if short processes keep arriving a long process may never reach the front of the queue and is said to be starved.

The marker looks for key phrases. If you said it another way and it is still right, give yourself the mark.
6Explain why HTTPS uses both symmetric and asymmetric encryption.5 marks

Mark scheme0 / 5
  • LAsymmetric encryption uses a freely distributable public key and a private key
  • LThis solves the key distribution problem, since no secret needs to be transmitted
  • LAsymmetric encryption is computationally slow
  • LIt is therefore used only to exchange a symmetric session key securely
  • LThe actual data is then encrypted symmetrically, which is much faster
Model answer

Symmetric encryption is fast and therefore well suited to encrypting the volume of data involved in a web session, but it requires both parties to hold the same secret key, and transmitting that key over an untrusted network exposes it to interception, which is the key distribution problem. Asymmetric encryption solves that problem completely, because the public key can be published openly and only the matching private key can decrypt what it encrypts, so no secret ever has to be transmitted. However, asymmetric encryption is computationally expensive and far too slow to use for an entire session. HTTPS therefore combines them: at the start of the connection asymmetric encryption is used to securely agree a symmetric session key, with the server's identity verified by a digital certificate issued by a certificate authority, and once both parties hold that session key all the actual data for the session is encrypted symmetrically. This obtains the secure key exchange of asymmetric encryption together with the speed of symmetric encryption.

The marker looks for key phrases. If you said it another way and it is still right, give yourself the mark.
7A table stores OrderID, CustomerName, CustomerAddress, ProductID, ProductName and Price. Explain why this table is not in third normal form and describe how it should be restructured.6 marks

Mark scheme0 / 6
  • LCustomerName and CustomerAddress depend on the customer rather than the order
  • LProductName and Price depend on ProductID, not on OrderID
  • LThese are transitive dependencies, breaking third normal form
  • LThis causes redundancy and update anomalies
  • LCreate separate Customers and Products tables
  • LThe Orders table holds foreign keys to both
Model answer

The table is not in third normal form because it contains transitive dependencies: attributes that depend on other non key attributes rather than directly on the primary key. CustomerName and CustomerAddress depend on which customer placed the order rather than on the order itself, so a customer who places twenty orders has their name and address stored twenty times. ProductName and Price depend on ProductID rather than on OrderID, so the same product details are repeated in every order line containing that product. The consequences are redundancy and anomalies. Correcting a customer's address requires updating every one of their order records, and missing one leaves the database inconsistent, which is an update anomaly. A new product cannot be recorded until somebody orders it, which is an insertion anomaly, and deleting the last order for a product destroys all record of that product, which is a deletion anomaly. The correct structure is separate tables. A Customers table holds CustomerID as its primary key with the name and address. A Products table holds ProductID as its primary key with the name and price. An Orders table holds OrderID with a CustomerID foreign key, and because an order may contain several products a further OrderLines table holds OrderID and ProductID as foreign keys together with the quantity, resolving the many to many relationship between orders and products.

The marker looks for key phrases. If you said it another way and it is still right, give yourself the mark.
8Convert the denary number -37 into 8 bit two's complement, showing your working.3 marks

Mark scheme0 / 3
  • LConverts 37 to binary as 00100101
  • LInverts the bits to give 11011010
  • LAdds one to give 11011011
Model answer

First convert 37 into 8 bit binary: 32 + 4 + 1 = 37, giving 00100101. Then invert every bit, producing 11011010. Finally add one, giving 11011011. This can be checked by evaluating it with the most significant bit as a negative place value: -128 + 64 + 16 + 8 + 2 + 1 = -37.

The marker looks for key phrases. If you said it another way and it is still right, give yourself the mark.
9Explain the trade off between range and precision in a floating point representation.4 marks

Mark scheme0 / 4
  • LThe mantissa determines the precision of the value
  • LThe exponent determines the range of magnitudes representable
  • LThe total number of bits available is fixed
  • LSo increasing one necessarily reduces the other
Model answer

In a floating point representation the mantissa holds the significant digits of the number and therefore determines how precisely a value can be represented, while the exponent determines how far the binary point can be shifted and therefore the range of magnitudes that can be expressed. Because the total number of bits allocated to a floating point value is fixed, every bit given to the exponent is taken from the mantissa and vice versa. Widening the exponent allows extremely large and extremely small numbers to be represented but leaves fewer mantissa bits, so each value is stored to fewer significant figures and rounding errors grow. Widening the mantissa gives greater accuracy for each stored value but restricts the magnitudes that can be represented at all. The designer must therefore choose the split according to whether the application demands extreme magnitudes or high accuracy over a moderate range.

The marker looks for key phrases. If you said it another way and it is still right, give yourself the mark.
10Explain how a hash table achieves average constant time lookup and describe what happens when a collision occurs.5 marks

Mark scheme0 / 5
  • LA hash function converts the key into an index in the underlying array
  • LThe item is stored at and retrieved from that index directly with no searching
  • LSo lookup time does not increase as the number of items grows
  • LA collision occurs when two different keys hash to the same index
  • LResolved by chaining, storing a list at that slot, or by probing for the next free slot
Model answer

A hash table applies a hash function to the key, which deterministically converts it into an index within the underlying array. The item is stored at that index when it is inserted, and to retrieve it the same hash function is applied to the search key, producing the same index, so the item is found by a single direct array access with no searching of the structure at all. Because the position is calculated rather than searched for, the time taken does not grow as the number of stored items increases, which is what gives average constant time performance. A collision occurs when two different keys produce the same index. Under separate chaining, each slot holds a linked list and colliding items are appended to it, so lookup hashes to the slot and then searches only that short list. Under open addressing, the colliding item is placed in the next free slot instead, which avoids additional structures but tends to produce clusters of occupied slots that lengthen subsequent searches. In both cases performance degrades as the load factor rises, which is why the table is rehashed into a larger array once occupancy passes a threshold.

The marker looks for key phrases. If you said it another way and it is still right, give yourself the mark.
11Explain what is meant by a race condition and describe one way of preventing it.4 marks

Mark scheme0 / 4
  • LTwo or more threads access shared data at the same time
  • LThe result depends on the unpredictable order in which their operations interleave
  • LThis can produce incorrect results that occur only intermittently
  • LPrevention such as locking the shared resource so only one thread accesses it at a time
Model answer

A race condition occurs when two or more threads access shared data concurrently and at least one of them modifies it, so that the final result depends on the precise order in which their individual operations happen to interleave. A typical example is two threads each reading a counter, adding one and writing it back: if both read before either writes, one increment is lost. The defining difficulty is that the outcome is timing dependent, so the fault may appear only occasionally and may be impossible to reproduce under a debugger, which makes it exceptionally hard to diagnose. Prevention requires enforcing mutual exclusion, typically by using a lock or mutex around the section of code that accesses the shared resource, so that only one thread may enter it at a time and any other thread attempting to do so is made to wait. The cost is reduced parallelism within that section and the risk of deadlock if two threads acquire locks in different orders.

The marker looks for key phrases. If you said it another way and it is still right, give yourself the mark.
12Discuss the ethical issues raised by a company using an algorithm trained on historical hiring decisions to filter job applications.9 marks

Mark scheme0 / 9
  • LThe system learns patterns from historical data
  • LAny discrimination present in past decisions is reproduced by the system
  • LThe output appears objective, so it is trusted and challenged less
  • LNames a group likely to be disadvantaged
  • LRemoving protected characteristics is insufficient because proxy variables carry the information
  • LAccountability is unclear because no one can explain an individual rejection
  • LRecognises genuine benefits such as consistency, speed and reduced individual prejudice
  • LApplies an ethical framework or presents a substantive counterargument
  • LReaches a supported conclusion with specific safeguards
Model answer

The central problem is that a system trained on a company's historical hiring decisions learns the patterns present in those decisions, and it has no way of distinguishing patterns that reflect genuine job relevance from patterns that reflect past prejudice. If the company historically hired few women into technical roles, the model learns that applications resembling those of successful past candidates are preferable, and it will systematically downgrade applications from women without any instruction to consider gender at all. Attempting to solve this by removing protected characteristics from the input data is insufficient, because proxy variables carry the same information: the name of a school, membership of a sports club, a postcode or a gap in employment history can all correlate strongly with gender, ethnicity or socioeconomic background, and the model will find and use those correlations. The harm is amplified by how such decisions are perceived. An outcome produced by an algorithm carries an appearance of objectivity that a human decision does not, so it is scrutinised less and challenged less, and an applicant who suspects unfairness has no articulated reason to contest. This leads directly to accountability. If no one within the company can explain why a specific applicant was rejected, then in practice no one is answerable for it, and neither the applicant nor a tribunal can test whether the decision was lawful under equality legislation. A deontological analysis weighs heavily against the system as described: applicants have a right to be assessed on their own merits rather than on statistical resemblance to previous hires, and that right does not depend on whether the aggregate outcome is efficient. There are nonetheless real benefits, and a consequentialist analysis is more finely balanced. A large employer may receive thousands of applications for a single role, and human screening at that volume is itself inconsistent, subject to fatigue and demonstrably affected by individual prejudice such as name bias. An algorithm applies identical criteria to every application, processes them in seconds, and can be audited in a way that a hundred individual recruiters' judgements cannot. Overall the company should not deploy the system in the form described, but the appropriate response is regulation rather than abandonment. The defensible position is to use algorithmic screening only with specific safeguards: auditing outputs for disparate impact across protected characteristics rather than merely excluding those characteristics from the inputs, requiring that every rejection can be explained in terms a candidate would understand, retaining meaningful human review of borderline and rejected applications rather than treating the output as final, and retraining on data that has itself been examined and corrected for historical bias. Without those safeguards the system does not remove human prejudice from hiring, it automates it, scales it and conceals it.

The marker looks for key phrases. If you said it another way and it is still right, give yourself the mark.
13Explain two advantages of using a dynamic linked library rather than statically linking library code into an executable.4 marks

Mark scheme0 / 4
  • LThe executable is smaller because the library code is not included
  • LOne copy of the library serves every program that uses it, saving memory and disk space
  • LAn update to the library benefits every program without any of them being rebuilt
  • LAcknowledges the run time dependency as the trade off
Model answer

The first advantage is size and memory efficiency. With dynamic linking the executable contains only a reference to the library rather than a copy of its code, so the file itself is considerably smaller, and because a single copy of the library serves every program on the system that uses it, both disk space and memory are saved compared with statically linking the same code into a dozen separate executables. The second advantage is maintenance. When a defect or a security vulnerability is found in the library, replacing that one shared file fixes the problem for every program that depends on it, with none of them needing to be recompiled or redistributed. Under static linking each affected program would have to be rebuilt and reissued individually, which in practice means many never are. The trade off is a run time dependency: if the library is missing, or has been replaced with an incompatible version, the program will fail to start or behave unpredictably.

The marker looks for key phrases. If you said it another way and it is still right, give yourself the mark.
14Explain what is meant by an admissible heuristic and why A star requires one to guarantee an optimal path.4 marks

Mark scheme0 / 4
  • LA heuristic estimates the remaining cost from a node to the goal
  • LAn admissible heuristic never overestimates that cost
  • LA star selects nodes by f equals g plus h, the cost so far plus the estimate
  • LIf the heuristic overestimated, a shorter path could be discarded before being explored
Model answer

A heuristic in A star is a function that estimates the cost of travelling from a given node to the goal, and it is what allows the search to be directed towards the destination rather than expanding equally in every direction. A heuristic is admissible if it never overestimates the true remaining cost, so its estimate is always less than or equal to the actual cost of the best remaining path. A star expands nodes in order of f, which is g plus h, where g is the actual cost accumulated from the start and h is the heuristic estimate. Admissibility guarantees optimality because it ensures the algorithm never dismisses a node whose true total cost is lower than the one it chooses. If the heuristic overestimated the remaining cost for some node, that node's f value would be inflated, so it could be passed over in favour of a node that actually lies on a longer path, and the algorithm would return a suboptimal route while believing it optimal. Straight line distance is the standard admissible heuristic for geographic pathfinding, because no real route between two points can be shorter than the straight line between them.

The marker looks for key phrases. If you said it another way and it is still right, give yourself the mark.
15Explain the difference between the waterfall and agile methodologies and identify a scenario in which each would be the better choice.6 marks

Mark scheme0 / 6
  • LWaterfall completes each stage fully before beginning the next
  • LAgile works in short iterations delivering working software repeatedly
  • LWaterfall produces comprehensive documentation at every stage
  • LAgile involves the customer continuously and adapts to changing requirements
  • LWaterfall suits a scenario with fixed requirements and a documentation obligation
  • LAgile suits a scenario with uncertain or evolving requirements and an available customer
Model answer

Waterfall is a sequential methodology in which analysis, design, implementation, testing and evaluation are each completed and formally signed off before the next begins, producing comprehensive documentation at every stage. Agile is iterative: the work is divided into short cycles, each of which delivers a working increment that the customer reviews, and their feedback shapes what is built next. The consequences differ sharply. Waterfall gives strong managerial control and a complete audit trail but handles change extremely badly, since altering a requirement after design is complete means revisiting earlier stages at substantial cost, and the client sees nothing running until late. Agile treats change as normal rather than exceptional and surfaces misunderstandings within weeks, but it requires continuous customer availability, makes the final cost and date harder to predict, and produces lighter documentation that can hinder maintenance years later. Waterfall would be the better choice for control software in a medical device, where the requirements are fixed by regulation and cannot change, and where a regulator requires documented evidence that every requirement was specified, designed for and tested before approval is granted. Agile would be the better choice for a start up building a consumer application, where nobody yet knows exactly what users want, the requirements will certainly change as the product is tested with real people, and the ability to release, learn and adjust quickly matters far more than a fixed specification.

The marker looks for key phrases. If you said it another way and it is still right, give yourself the mark.
Machine mark 0 / 75
About this paper

This is an original paper written to match the structure, question style, command words and mark allocation of the real OCR H446/01 style assessment. It is not a past paper. Real past papers are the copyright of the exam board and cannot be republished here, so links to the official papers on the board's own site are provided on the exam papers page.