Duration: Not Set: © Ocr 2023. You May Photocopy This Page. 1 of 47 Created in Exambuilder
Duration: Not Set: © Ocr 2023. You May Photocopy This Page. 1 of 47 Created in Exambuilder
H046-FREV-P1-1.2
Archibald Holmes
Please note that you may see slight differences between
this paper and the original.
Duration: Not set
Candidates answer on the Question paper.
INSTRUCTIONS TO CANDIDATES
• Write your name, centre number and candidate number in the boxes above. Please write clearly and in capital letters.
• Use black ink. HB pencil may be used for graphs and diagrams only.
• Answer all the questions, unless your teacher tells you otherwise.
• Read each question carefully. Make sure you know what you have to do before starting your answer.
• Where space is provided below the question, please write your answer there.
• You may use additional paper, or a specific Answer sheet if one is provided, but you must clearly show your candidate
number, centre number and question number(s).
For example REMEMBER TO TAKE CHARLIE TO THE DENTIST THIS AFTERNOON becomes a queue:
words=["REMEMBER","TO","TAKE","CHARLIE","TO","THE","DENTIST","THIS","AFTERNOON"]
words.remove() then returns the next item in the queue for example temp=words.remove() assigns temp
the value "REMEMBER" and leaves words as
["TO","TAKE","CHARLIE","TO","THE","DENTIST","THIS","AFTERNOON"]
The display has four lines; each can show a maximum of 20 characters including spaces.
Examples
The contents of the display are stored in a 2D array of characters called display.
The procedure updateDisplay receives the queue words which holds the message and writes the message
to the display.
Write the procedure updateDisplay. Credit will be given for the readability of your code.
endprocedure
[7]
• Parcels that have a volume of less than 0.3 m3 and weigh less than 4 kg cost £5 to send.
• All other parcels cost £20 per m3 or £2 per kg, whichever is greater.
Examples
Parcel A weighs 2.5 kg, has a volume of 0.1 m3 and costs £5 to send.
Parcel B weighs 6 kg, has a volume of 0.2 m3 and costs £12 to send.
Parcel C weighs 6 kg, has a volume of 0.8 m3 and costs £16 to send.
The function getCost takes in the volume and weight of a parcel and returns the cost.
getCost(2.5,0.1) returns 5
getCost(6,0.2) returns 12
getCost(6,0.8) returns 16
Complete the pseudo-code below so that the function getCost returns the correct cost.
3 A programmer has written the following code designed to take in ten names then print them in a numbered list.
It has been suggested that this code could be made more efficient and easier to maintain using an array or a list.
Write a more efficient version of the programmer’s code using an array or a list.
4 A theatre has a website showing its productions and allowing people to make bookings.
Part of the site is shown below. The words ‘Book tickets’ link to the page ‘bookings.html’.
Upcoming productions:
1. Macbeth
2. Blood Brothers
3. An Inspector Calls
Book tickets
Describe one of the tables you might expect to see in this database.
[2]
State the name of a type of translator software other than a compiler or interpreter.
[1]
(b) Linux is a popular open source operating system and Windows is a popular closed source operating system.
[3]
(c) Explain the difference between open source and closed source software.
[4]
[2]
The weather station records the temperature every day as an integer. At the end of the year the temperatures
are stored in an array called temperatures.
Write a program in pseudocode that reads through this array and produces an output which shows the total
number of days within each band. An example of such an output is shown below.
Band A: 93
Band B: 143
Band C: 98
Band D: 31
7
A programmer is writing a game to run on a variety of games consoles. Discuss the different ways in
which they might use virtual machines in this process and any advantages and disadvantages of doing so.
[3]
JavaScript is used to check that a reasonable value is being entered before a meter reading is sent to a server.
When the user enters a meter reading number, the function validateReading is called. If the number entered
is a valid number between 1 and 999999 inclusive, it returns true otherwise it returns false.
You will need to use the JavaScript function isNaN() standing for “is not a number”. This returns true if the
value it is given is not a number and false if it is.
function validateReading(reading)
{
[4]
(i) In order to be able to access all the functionality of the meter, the computer needs a device driver. Describe
what is meant by the term ‘device driver’.
[2]
(ii) In order to transfer data, the meter and computer need an established set of rules for how they will
communicate.
State the term used for a set of rules for communication between two devices.
[1]
State the type of application that the user might use to analyse the data once downloaded.
[1]
Describe how a desktop operating system is loaded when a personal computer is first switched on.
[2]
State a utility that might be supplied with a desktop operating system to help with system maintenance.
[1]
(c) * One of the key functions of an operating system in a personal computer is to manage system resources
such as memory and CPU time. Discuss the different approaches a desktop operating system can take to
managing these system resources and the relative advantages of each approach.
[9]
Identify the type of operating system that the photo frame is most likely to use.
12 When the fridge receives a message it takes the string and stores it in a queue called words.
For example REMEMBER TO TAKE CHARLIE TO THE DENTIST THIS AFTERNOON becomes a queue:
words=["REMEMBER","TO","TAKE","CHARLIE","TO","THE","DENTIST", "THIS","AFTERNOON"]
The display has four lines; each can show a maximum of 20 characters including spaces.
Examples
The procedure updateDisplay receives the queue words which holds the message and writes the message
to the display.
Write the procedure updateDisplay. Credit will be given for the readability of your code.
Discuss what measures can be taken to improve Dan’s computer’s performance. You should explain what these
measures are, why they improve the performance and justify whether you would recommend them.
[9]
When items are scanned in at the checkout they are stored in a 2-dimensional array called purchases, which
stores the item name, category and price.
Examples of the array and corresponding receipt are shown in Fig. 2 and Fig. 3.
[6]
[2]
If the codes match, the program jumps to the part of the program labelled deactivate.
If the codes do not match, the program jumps to the part of the program labelled alarm.
Write the LMC code to meet the requirements above. (You don't have to write the code for labels deactivate
and alarm, as you can assume this has already been written elsewhere.)
[4]
16(a) A programmer spends her spare time contributing to an open source application that converts video files from a
range of formats to one which uses lossy compression.
[2]
(b) When a video is selected, the program gives an estimate of the file size of the converted video. The estimate in
kilobytes is calculated by multiplying:
Write a function in pseudocode that estimates the size of a converted video. It should:take in 3 parameters:
pixels, framesPerSec, lengthMins
Examples:
480000 pixels at 24 frames per second for 60 minutes will return a size of 898.56 MB
480000 pixels at 24 frames per second for 120 minutes will return a size of 1.797 GB.
[4]
* Discuss the benefits and drawbacks of the three options above and justify which option you would recommend.
[9]
Producing CGI requires lots of processing power and so the company has a large number of high-performance
computers.
Explain why See And Believe would use a distributed operating system.
[3]
temp=words.remove()
if xPos+1+temp.length>20
then
yPos=yPos+1
xPos=0
endif
display[xPos+j,
yPos]=temp.substring(j,1)
next j
xPos=xPos+temp.length+1
next i
endprocedure
Examiner’s Comments
Total 7
Examiner’s Comments
Total 4
Examiner’s Comments
Total 5
Total 2
5 a An Assembler 1 (AO1.1)
c – Open source has the source code freely 4 (AO1.1) Examiner’s Comments
available…
– … to amend/copy/redistribute/recompile Candidates who did not refer to the ability
– Whereas closed source is distributed in to access and modify or distribute the
binary form only/the source code is not ‘source code’ in relation to open source
made available… and closed source software did not
– There are licensing conditions restricting generally score well on this question.
the redistribution/there is no permission Centres need to make sure candidates use
to amend the (program) code the correct technical terminology at this
(1 per - , max 4) level of study.
Total 10
E.g.
Examiner’s Comments
Total 6
Total 9
Examiner’s Comments
Total 3
9 a 4 Example solution:
- Returns false if reading is not a if(!isNaN(reading) &&
number. AO3.2 reading>=1 && reading<=999999)
- Returns true if reading is >=1 (4) {
- and ⇐999999 (but no other values) return true;
- Returns false for a number not }
between these values. else
{
(1 per -, max 4) return false;
}
Do not penalise for lack of ;
{ } are not needed in this case.
Examiner’s Comments
b i - A program/software 2
- That controls a piece of hardware AO1.1
- Providing an interface/bridge between (2)
the device and (operating) system
(1 per -, max 2) Examiner’s Comments
ii Protocol(s) 1 cao
AO1.1
(1) Examiner’s Comments
Total 8
There is a line of reasoning presented with Interrupts are signals sent to the processor
some structure. The information presented asking for attention.
is in the most part relevant and supported
by some evidence. AO3
There may be spelling errors or errors of With segmentation only the exact space
grammar in the response but they are not needed is used per program, however as
obtrusive. programs are loaded and removed from
memory there may be wasted space
between programs. Programmers often
need to specify segments.
Mark Band 1-Low Level (1-3 marks) The fixed size of pages make it easier to
The candidate demonstrates a basic allocate pages and work out their position.
knowledge of how OSs manage system Space inside a page may be ‘wasted’ as
resources The candidate makes a limited program is unlikely to take up exact
attempt to apply acquired knowledge and number of pages, however all pages can
understanding to the context provided be used with no wasted space between
The candidate provides a limited them. Programmer need not worry about
discussion which is narrow in focus. the pages.
Judgments if made are weak and
unsubstantiated. The information is basic In practice both are used in conjunction
and communicated in an unstructured way. (e.g. segmentation on top of paging).
The information is supported by limited
evidence and the relationship to the Some scheduling algorithms (e.g. SJF,
evidence may not be clear. STR) can cause starvation (i.e. certain jobs
There are likely to be spelling errors and/or never get processed).
errors of grammar, which will disrupt the More complicated scheduling algorithms
flow of the response take up lots of processor time for the
scheduling itself, taking away processing
0 marks time from the actual jobs that need
No attempt to answer the question or processing.
response is not worthy of credit. Interrupts mean that the processor only
has to worry about being needed when told
(as opposed to having to constantly check
i.e. polling).
Examiner’s Comments
Total 12
Total 1
Examiner’s Comment
Candidates found this question challenging
although there were many excellent
solutions. Not all candidates noted in the
question that ‘Credit will be given for the
readability of your code’. In many cases
where candidates had attempted a solution
which contained errors they were still able
to gain marks for appropriate indentation
and the use of sensible variable names.
Total 7
Examiner’s Comments
Candidates were assessed on the quality
of their extended response in this question.
Most candidates could cite some methods
for improving performance but not all
managed to then appropriately apply these
to the question. Many candidates did
recommend one or more measures
although some cases needed to include
justification. This resulted in some very
Total 9
Examiner's Comments
Total 6
Total 6
Examiner's Comments
c Mark Band 3–High Level (7-9 marks) 9 AO1: Knowledge and Understanding
The candidate demonstrates a thorough The following is indicative of possible that
knowledge and understanding of a wide candidates may refer to but is not
range of the technical issues the coding prescriptive or exhaustive:
team might have considered; the material Java
is generally accurate and detailed. The One version needs be written and can be
candidate is able to apply their knowledge used on any device / OS combination that
and understanding directly and consistently has the Java Virtual Machine rather than
to the context provided and come to a well having to write multiple versions.
argued conclusion. Evidence / examples Code running on a VM tends to be slower
will be explicitly relevant to the explanation. than compiled.
The candidate provides a thorough C++
discussion which is well-balanced. Multiple versions of the code will need to
Evaluative comments are consistently be maintained for different architectures…
relevant and well-considered. …however there may be minimal
differences between them, and then just
There is a well-developed line of reasoning need compiling with different compilers.
which is clear and logically structured. The
information presented is relevant and Program will run quicker than alternatives.
substantiated.
JavaScript
Mark Band 2 –Mid Level (4-6 marks) As interpreted likely to be by far the
The candidate demonstrates reasonable slowest option.
knowledge and understanding of the Will run in any browser.
technical issues the coding team might
have considered; the material is generally AO2: Application
accurate but at times underdeveloped. The The selected knowledge / examples should
candidate is able to apply their knowledge be directly related to the specific question.
and understanding directly to the context The following is indicative of possible
provided although one or two opportunities factors / evidence that candidates may
are missed. A reasoned conclusion is refer to but is not prescriptive or
drawn. Evidence / examples are for the exhaustive:
most part implicitly relevant to the
explanation The candidate provides a Java
reasonable discussion, the majority of Multiple devices can include devices other
which is focused. Evaluative comments are than PCs (i.e. phones, tablets).
for the most part appropriate, although one People with unusual operating systems or
or two opportunities for development are architectures would have access to the
missed. application.
There is a line of reasoning presented with It makes commercial sense to sell to as
some structure. The information presented wide an audience as possible.
is in the most part relevant and supported The speed reduction compared to
by some evidence. compiled code will likely be noticeable with
such a processor intensive task.
Mark Band 1-Low Level (1-3 marks) As running on a VM coders will have
The candidate demonstrates a basic limited (if any) access to some of the low
knowledge of the technical issues the level features (e.g. access to the GPU)
coding team might have considered with which can optimise the program.
limited understanding shown; the material Intermediate code is used helping protect
JavaScript
Most people have web browsers so by far
most compatible option (don't even need
VM).
The slow speed may be frustrating…
…though as no user interaction is needed
this may be a trade off worth making.
Source code is visible (though can be
obfuscated) meaning it can easily be
copied and amended.
AO3: Evaluation
Candidate has used the points above to
justify their choice of language.
Examiner's Comments
Total 15
17 Any 2 from: 3
Examiner's Comments
Allow multiple computers / resources…
(AO1.1) Few candidates gained full marks on this
To be treated as one / work on the question. Many candidates described
same problem (AO1.1) general characteristics of a network
operating system rather than a distributed
1 from: operating system. Fewer appropriately
related their explanation to the scenario.
Meaning all the computers can work on
producing the same special effect.
(AO2.1)
Total 3