Operating systems and translation software – A Level Computer Science (9618)
21 questions · page 1 of 2 · Clear filters
Question text
7
(a) Write this infix expression in Reverse Polish Notation (RPN).
21 * (15 – 3 + 8) / 7
…
…
…
… [2]
(b) Write this RPN expression in infix form.
c d + a b – a c - * /
…
…
…
… [3]
(c) The RPN expression
15
9 – 24
3 / * 18
6 + /
is to be evaluated.
Show the changing contents of the stack as the RPN expression is evaluated.
[4]
© Cambridge University Press & Assessment 2026
Question text
6
(a) Write this infix expression in Reverse Polish Notation (RPN).
16 + ((9 – 7) / (18 + 6))
…
…
…
… [2]
(b) Write this RPN expression in infix form.
6
15 + 20
3 - - 27
9 * /
…
…
…
…
…
… [3]
(c) The RPN expression
c a b - * b c + / d *
is to be evaluated, where:
a = 8, b = 2, c = 10 and d = 18.
Show the changing contents of the stack as the RPN expression is evaluated.
[4]
© Cambridge University Press & Assessment 2026
Question text
7
(a) Outline the process of using a stack to evaluate an expression written using Reverse Polish
Notation (RPN).
…
…
…
…
…
…
…
… [3]
(b) Write the following infix expression in RPN.
((18 – 15 + 3) * 5) / 12
…
…
…
… [2]
(c) The RPN expression
16
3 * 36
6 / 18
6 - * +
is to be evaluated.
Show the changing contents of the stack as the RPN expression is evaluated.
[4]
© Cambridge University Press & Assessment 2026
Question text
6
Describe the process of executing a program using an interpreter.
…
…
…
…
…
…
…
… [4]
ĬÓĊ®Ġ´íÈõÏĪÅĊßù¶þ×
Question text
7
Several syntax diagrams are shown.
uppercase
lowercase
A
b
C
d
E
f
G
h
J
k
symbol
digit
$
0
@
1
#
2
3
&
4
%
5
6
7
8
9
lowercase
passcode
uppercase
symbol
digit
ĬÑĊ®Ġ´íÈõÏĪÅĊÝû¶Ā×
,
,
(a) State why each passcode is invalid for the given syntax diagrams.
#Jd7
Reason …
…
C%6A
Reason …
…
[2]
(b) Complete the Backus-Naur Form (BNF) for <uppercase> and <passcode>.
<uppercase> ::= …
…
<passcode> ::= …
…
…
…
…
…
[4]
ĬÓĊ®Ġ´íÈõÏĪÅĊÝù¶Ā×
Question text
8
(a) Describe what is meant by multi-tasking and how it benefits process management.
…
…
…
…
… [2]
(b) Explain the function of the shortest remaining time scheduling routine and give a benefit of
this routine.
Function …
…
…
…
…
…
Benefit …
…
[4]
Question text
5
The management and scheduling of processes are tasks carried out by an operating system.
(a) Identify three process states.
1 …
2 …
3 …
[3]
(b) Describe the function of the shortest job first scheduling routine and give a benefit of this
routine.
Function …
…
…
…
…
…
Benefit …
…
[4]
Question text
8
Explain what is meant by lexical analysis during program compilation.
…
…
…
…
…
…
…
… [4]
ĬÓĊ®Ġ´íÈõÏĪÅĊÝû¶þ×
Question text
9
Several syntax diagrams are shown.
letter
digit
A
0
B
1
C
2
D
3
E
4
F
5
G
6
H
7
J
8
K
9
operator
+
–
*
/
letter
variable
letter
digit
^
ĬÑĊ®Ġ´íÈõÏĪÅĊßù¶Ā×
,
,
(a) State why 9K is not a valid variable for the given syntax diagrams.
…
… [1]
(b) Complete the Backus-Naur Form (BNF) for <operator>.
<operator> ::= …
… [1]
(c) An expression is defined as follows:
•
A variable is assigned to a variable followed by an operator followed by another variable.
•
The operator and final variable stage can be repeated as many times as necessary.
Complete the syntax diagram for an expression.
expression
=
variable
[3]
(d) A character can be a letter or a digit.
An additional constraint has been applied to the definition of variable. It must comply with the
given syntax diagram, but it will only pass validation if it has at least four characters.
State one example of a valid variable.
…
… [1]
Question text
6
The management and scheduling of processes are tasks carried out by an operating system.
(a) Describe one reason why scheduling is necessary in process management.
…
…
…
… [2]
(b) Explain the function of the round robin scheduling routine and give a benefit of this routine.
Function …
…
…
…
…
…
Benefit …
…
[4]
ĬÓĊ®Ġ´íÈõÏĪÅĊÞú¶þ×
[Turn
over
Question text
8
Explain the process of syntax analysis during program compilation.
…
…
…
…
…
…
…
… [4]
ĬÑĊ®Ġ´íÈõÏĪÅĊàü¶Ā×
,
,
ĬÓĊ®Ġ´íÈõÏĪÅĊàú¶Ā×
Question text
9
Several syntax diagrams are shown.
upper
digit
J
0
K
1
2
L
3
V
4
X
5
Z
lower
6
a
7
e
8
i
9
p
u
y
lower
lower
passcode
upper
digit
digit
digit
(a) State why JJ90 is not a valid passcode for the given syntax diagrams.
…
… [1]
ĬÑĊ®Ġ´íÈõÏĪÅĊÝü¸þ×
,
,
(b) Complete the Backus-Naur Form (BNF) for <upper> and <passcode>.
<upper> ::= …
…
<passcode> ::= …
…
…
…
[3]
(c) A character can be an upper, a lower or a digit.
The rules for passcode have been changed so that the third character may also be selected
from upper and the final character may be repeated one or more times.
Complete the syntax diagram for passcode to show these changes.
lower
lower
passcode
upper
digit
digit
digit
[2]
ĬÓĊ®Ġ´íÈõÏĪÅĊÝú¸þ×
Question text
5
(a) Write this Reverse Polish Notation (RPN) in infix form:
5 2 + 9 3 - / 3 *
…
…
…
… [3]
(b) Write this infix expression in RPN:
((7 + 3) - (2 * 8)) / 6
…
…
…
… [2]
(c) Evaluate this RPN expression:
a b - c d + * e /
when
a = 17, b = 5, c = 7, d = 3 and e = 10
Show the changing contents of the stack as the RPN expression is evaluated.
[4]
Question text
5
(a) Write this infix expression in Reverse Polish Notation (RPN):
(7 – 2 + 8) / (9 – 5)
…
…
…
… [2]
(b) Evaluate this RPN expression:
a d + a b + c - *
when
a = 6, b = 3, c = 7 and d = 9
Show the changing contents of the stack as the RPN expression is evaluated.
[4]
(c) Write this RPN expression in infix form:
b a c - + d b + * c /
…
…
…
… [3]
Question text
5
(a) Write this Reverse Polish Notation (RPN) in infix form:
5 2 + 9 3 - / 3 *
…
…
…
… [3]
(b) Write this infix expression in RPN:
((7 + 3) - (2 * 8)) / 6
…
…
…
… [2]
(c) Evaluate this RPN expression:
a b - c d + * e /
when
a = 17, b = 5, c = 7, d = 3 and e = 10
Show the changing contents of the stack as the RPN expression is evaluated.
[4]