P3 - Mark Scheme
P3 - Mark Scheme
P3 - Mark Scheme
(ii) +3.5
= 11.1 [1]
= 0.111 × 22 (or indication of moving binary point correctly) [1]
= 01110000 0010 [1]
(a) +2.5
= 010100000000 0010 [3]
Give full marks for correct answer (normalised or not normalised)
= 10.1 [1]
= 0.101 × 22 // evidence of shifting binary point appropriately [1]
[Max 3]
(b) –2.5
101100000000 0010
Give full marks for correct answer
[Max 3]
(c) 3 [3]
Give full marks for correct answer
[Max 3]
(a) +3.5
01110000 00000010 [3]
Give full marks for correct answer (normalised or unnormalised)
= 11.1 [1]
= 0.111 × 22 // evidence of shifting binary point appropriately [1]
[Max 3]
By: ALI AKRAM Airport Road | Bahria Town | Johar Town
___________________________________________________________________________________________________
Topic 1: Mark Scheme Computer Science Paper 3 Topical
(b) –3.5
10010000 00000010 [3]
3 marks for correct answer
One’s complement of 8-bit mantissa for +3.5 10001111 – allow f.t. [1]
+1 to get two’s complement 10010000 [1]
[Max 3]
(c) 14 [3]
3 marks for correct answer
[Max 3]
(e)
[1]
1 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1
[1]
(c)(i) 6715 1
(c)(ii) 8216 1
(c)(iii) 88 1
(c)(iv) FALSE 1
(d)(i) Temp2 ← 22 1
7 (a) Example: 1
Speed of access
Just used as a look-up file
No need for any serial or sequential processing
1 mark for any valid point
802139 2139
700004 4
689998 89998
102139 2139
For example:
TYPE MyContactDetail
DECLARE Name : STRING
DECLARE Area : (uptown, downtown, midtown) 1
DECLARE HouseNumber : 1..499 1&1
ENDTYPE
(c)(i) 4402 1
(c)(ii) 33 1
(c)(iii) 3427 1
(c)(iv) TRUE 1
(d)(ii) MyInt1 ← 33 1
random sequential
serial direct
sequential
(b)(i) File
A: 3
Serial 1
Meter readings are submitted over time // added to the end of file 1
Stored chronologically 1
(b)(ii) File B: 3
Sequential 1
Any two points from:
Each customer has a unique account number 1
Sorted on Account number 1
High hit rate // Suitable for batch processing monthly statements 1
(b)(iii) File C: 3
Random 1
Login without waiting // Random organisation allows fastest direct access to
required record 1
Low hit rate // Suitable for access to individual records 1
11 (a) single data type that does not involve a reference to another type/usually 1
built in to a programming language
(b) 1 mark for data type, 1 for definition, max 4, 2 data types 4
• Integer
• Stores a whole number
• Boolean
• Stores true or false/1 or 0/on or off
• Real/Single/Double/Float/Decimal
• Stores decimal numbers
• String
• Stores zero or more characters
• Char
• Stores a single character
• Pointer
• Whole number used to reference a memory location
• StudentCourse: ARRAY[1:6] OF
For example:
TYPE StudentAssessment
DECLARE Code : STRING
DECLARE Mark : ARRAY[1:6] OF INTEGER
DECLARE AverageMark : REAL
ENDTYPE
14 (a) Record 1
(b) Enumerated 1
• Mantissa = 01110000
• Exponent = 0110
• Mantissa = 01111111
• Exponent = 0111
• Mantissa = 01000000
• Exponent = 1000
Working:
• Correct calculation of negative value (any method) (= – 0.11010001101)
• Correctly moving the binary point 7 places (= – 01101000.1101)
// Exponent 7
Answer:
13
• −104.8125 // –104
16
Working:
• Correct conversion to binary (01.1001)
• Correct calculation of exponent (1)
Answer:
• (Mantissa) 0110 0100 0000 (Exponent) 0001
• Mantissa = 0111 1111 1111
• Exponent = 0111
• Mantissa = 0100 0000 0000
• Exponent = 1000
Working:
• = 0. 0110111 x 2^5 places // exponent = 5
• = 1101.11 (moving bp 5)
Answer:
• = 13.75 // 13 ¾
(a)(ii) The first two bits of the mantissa are 0 / the same / not different / are not 01 1
Working:
• 01011.101
• 0.1011101 × 2^4 // showing calculation of exponent = 4
Answer:
• 01011101 0100
Working:
• 10100.011 // 10100011 correct use of two’s complement or other method
• Exponent = 4
Answer:
• 10100011 0100
• Exponent 0010 = 2
41 1 1
• Mantissa 0.1010010 becomes 010.10010 // // 2 + +
64 2 16
9
• Answer 2 // 2.5625
16
1
• − 3.75 = 100.01000 // – 4 +
/ 0.25
4
• 100.01000 becomes 1.0001000 Exponent = + 2
• Answer: Mantissa = 10001000 Exponent = 0010
TYPE Employee
DECLARE EmployeeID : STRING
DECLARE EmployeeName : STRING
DECLARE Department : (Sales, Technical,
CustomerServices)
DECLARE Salary : 25000..150000
ENDTYPE
By: ALI AKRAM Airport Road | Bahria Town | Johar Town
___________________________________________________________________________________________________
Topic 1: Mark Scheme Computer Science Paper 3 Topical
• Array
• List
• Set
• Collection
• Class
• Stack
• Queue
• Linked list
• Dictionary
Page:
• Virtual Memory is divided into blocks of a fixed size
Page frame:
• the main memory is divided into page frames of the same size as a
page
Page table:
• the Page (Map) table shows the mapping of pages to page frames
(c) A signal from a software source or hardware device seeking the attention 1
of the processer
• JOB32
• JOB42
• JOB42
22 (a)(i) 1101 1
(a)(ii) 011100000000 1
sender’s IP address
receiver’s IP address
packet sequence number
checksum
[Max 2]
(b) e.g.
cs: gives dedicated circuit [1]
ps: split into packets/chunks [1]
ps: sends packets on individual routes [1]
cs: whole bandwidth available // ps: shares bandwidth [1]
cs: faster data transfer [1]
cs: packets arrive in order they are sent [1]
cs: packets cannot get lost [1]
cs: better for a real-time application [1]
ps: packets may arrive out of order so delay until packet order restored [1]
ps: packets may get lost so retransmission causes delays [1]
[max. 6]
(a) (i)
Application [1]
Transport
Internet [1]
[Max 4]
[Max 2]
[Max 2 parameters]
[Max 4]
banking [1]
private / secure email [1]
shopping [1]
financial transactions [1]
secure file transfer [1]
[Max 2]
6 (a)
Computer A Computer B Server 4×
Computer to
Switch
[1]
Server to
Computer C Computer D Switch Switch
[1]
(b)
Statement True False
[Max 2]
7 (a)(i)
Packet: 2
Both web page and web page request are split into packets 1
Each packet is sent individually from device to device 1
(a)(iii) TCP/IP: 2
Is the protocol 1
Rules for communication between web server and browser 1
(b)(iii) In packet switching, packets can take different routes and may not arrive in Max 3
order
Will arrive in order (only one route)
As packets can take many different routes / share paths with others can be
delayed
Dedicated circuit has full bandwidth
No loss of synch
1 mark for any valid point
(b)(i) Peer-to-peer 1
(b)(ii) Filesharing 1
9 (a) 1
(c)(iii) • Each packet has the IP address of the web server / destination 3
address
• The routers use routing tables
• Routers on the Internet forward packets towards destination
• Packets can take different routes from source to destination
• Packets are reassembled in order at the web server
1 mark for each point, max 3
11(a) 2
Computer
Server
A
Router
T
T Computer Computer
Internet
B C
(c)(i) • Only one transmission is allowed on the bus at any one time // only one 2
packet can be transmitted on the bus at any one time (1)
• The two packets from A and B cannot both use the bus at the same time
(1)
• The attempts to transmit will be unsuccessful, because the stations will
realise that the bus is busy (1)
• Reference to CSMA/CD (1)
• Collision causes a change in voltage of the bus (1)
1 mark for each point, max 2
Alternative answers:
(d)(ii) As each computer is now not sharing a single bus // has dedicated path (to 2
the server) (1)
Collisions cannot occur (1)
Alternative answers:
Mesh
As each device now has a direct path to all the others (1)
Collisions cannot occur (1)
Ring
Packets all travel in the same direction (1)
Collisions cannot occur (1)
Benefits
• Signals only go to destination//secure
• Easy to connect/remove nodes or devices/trouble shoot.
• Centralised management helps in monitoring the network.
• Failure of one node or link doesn’t affect the rest of network.
• Performance does not degenerate under load
• Connections may use different protocols
• Fewer collisions
Drawbacks
• If central device fails then whole network goes down.
• Performance is dependent on capacity of central device.
Benefits
• Easier to set-up/extend.
• Less cable required
Drawbacks
• If the main cable breaks, network performance badly degraded.
• Difficult to detect and troubleshoot fault at an individual station.
• Efficiency reduces as the number of devices connected to it
increases.
• Collisions // not suitable for networks with heavy traffic.
• Security is lower (because several computers receive the sent
signal from the source.)
(b) 1 mark for each correct pair of letters in the right order max 3 3
Protocol Layer
TCP Transport
IP Internet/Network
SMTP Application
Responsibility TCP IP
Correct routing 9
Host to host communication 9
Communication between networks 9
Retransmitting missing packets 9
Reassembling packets into the correct order 9
(b) 1 mark for name, 1 mark for matching use, max 4 for 2 protocols 4
(d)(ii) 1 mark per benefit, 1 mark per expansion, max 4 for 2 benefits 4
For example :
Layer Protocol
Transport TCP
Internet IP
Shares bandwidth 9
Computer Printer
1 Server
Computer
Computer
(a)(ii) 1 mark per benefit and 1 mark for a further explanation in context to max 2 4
(x2)
For example:
• Personal data (used by admissions department) is kept secure
• transmissions only go between server and destination
(b) 1 mark 3
Any real-time application e.g. video conferencing // live streaming of a concert
• Application
• Transport
• Internet / Network
• Data Link
For example:
• IP address of sender
• IP address of destination
• IP version
• Number of packets the message consists of
• ID number of that packet
• Protocol used
• Packet length
• Time to live // max number of hops
• Synchronisation data
• Source port
• Destination Port
• Checksum
Computer 1 and Computer 2 are on the same bus network. Computer 1 sends a
message to Computer 2. Before the message is sent, it is split into packets.
Computer 1 needs to check that the line / path / bus / channel is free before
sending the message, otherwise a collision will occur that will be managed by
the CSMA/CD protocol.
Router
• Contains a routing table
• holds the (private) IP / MAC addresses of the devices on the bus
• provides the public IP address for the network
• forwards packets to the correct IP / MAC address
• may contain a firewall / proxy server
NIC
• Has a (unique) MAC address
• to identify a device
• Provides a hardware interface // physical connection between computer and
network // connection to Ethernet cable
1 (a) (i)
Circuit 1
A B X 1
0 0 1
0 1 0
1 0 0
1 1 0
(ii)
Circuit 2
A B X 1
0 0 1
0 1 0
1 0 0
1 1 0
(ii) 1
A+ B ≡ A.B
(c)
( A.B ) + B
mark as :
( A.B ) 1
+B 1
bar over whole expression 1
(d)
( A.B ) + B
1
= ( A.B ) . B
1
= ( A.B ).B
1
= A.( B.B )
= A.0 1
=0 1
max 3
allow f.t. from (c)
2 (a)
Description Type of
processor
Makes extensive use of
general purpose registers RISC I mark for
correct arrow
from each
description
Has a simplified
instruction set
[3]
(b) (i)
Time Interval
stage 1 2 3 4 5 6 7 8 9
Fetch instruction A B C
Decode instruction A B C
(ii)
AB
00 01 11 10
0 0 0 1 0
C
1 0 1 1 0 [1]
(iii)
AB
00 01 11 10
(iv) X =
A.B [1]
+ B.C [1]
Allow f.t. from (iii)
(b) (i)
AB
00 01 11 10
1 mark row headings
00 0 1 1 0
1 mark column headings
01 0 0 0 0
CD 1 mark per 2 correct
rows (based on headings)
11 0 0 1 0
10 0 1 1 0
[4]
(ii)
AB
00 01 11 10
10 0 1 1 0
[2]
(iii) X =
B.D [1]
+ A.B.C [1]
[4]
[Total: 10]
5 (a) (i)
Z = P. Q . R + [1]
P. Q.R + [1]
P.Q.R [1]
(ii)
PQ
00 01 11 10
0 0 0 0 1
R
1 0 0 1 1
[1]
00 01 11 10
0 0 0 0 1
R
1 0 0 1 1
(iv)
Z=
P. Q [1]
+ P.R [1]
00 01 11 10
00 0 0 0 0
01 0 1 1 1
RS
11 0 1 1 0
10 0 0 0 0
[4]
(ii) 1 mark for loop with two 1s; 1 mark for loop with four 1s
PQ
00 01 11 10
00 0 0 0 0
01 0 1 1 1
RS
11 0 1 1 0
10 0 0 0 0
(iii)
Z=
Q.S [1]
+ P.R. S [1]
6 (a) (i)
Input Output
X Y A B
0 0 0 0 1 mark for each
correct column
0 1 0 1 (A and B)
1 0 0 1
1 1 1 0
[2]
A.(A.B+C)
= A.A.B + A.C
= A.B +A.C
= A.(B+C)
7 (a) (i)
Input Output
Working space
P Q R J K
0 0 0 0 0
0 0 1 0 1
1 mark each column
0 1 0 0 1
0 1 1 1 0 If zero marks then
6 or 7 pairs correct – 1 mark
1 0 0 0 1
1 0 1 1 0
1 1 0 1 0
1 1 1 1 1
[2]
A. ((A+B).C)
= A.(A.C + B.C)
= A.A.C +A.B.C
= A.C + A.B.C
= A.C (1 + B)
=A.C.1
= A.C
[4]
0 0 0 0
0 0 1 0
0 1 0 0
0 1 1 0
1 0 0 1
1 0 1 1
1 1 0 0
1 1 1 1
1 mark first four entries, 1 mark for the last four entries
(c)(i) 1
AB
00 01 11 10
0 0 0 0 1
C
1 0 0 1 1
(c)(ii) 2
AB
00 01 11 10
0 0 0 0 1
C
1 0 0 1 1
1 1
9 (a) S = ( P + (Q+R) ) . R 4
P 1
(Q +R) 1
( P +( Q + R ) ) 1
.R (must be outside final brackets) 1
Or
P 1
(Q +R) 1
P +( Q + R ) 1
(«««..). R 1
0 0 0 0
0 0 1 1
0 1 0 0
0 1 1 1
1 0 0 0
1 0 1 0
1 1 0 0
1 1 1 0
2 marks all correct, 1 mark seven correct, 0 marks six or fewer correct
(c)(i) PQ 1
00 01 11 10
0 0 0 0 0
R
1 1 1 0 0
(c)(ii) PQ 1
00 01 11 10
0 0 0 0 0
R
1 1 1 0 0
(c)(iii) S= P .R 1
(d) S = (P + ( Q + R ) ) . R 3
S = ( P + ( Q . R ) ) . R // P .R + ( Q + R ) . R 1
S = (P . R ) + ( Q . R . R ) 1
S= P . R + Q . 0 )
S= P . R + 0 ) 1
S= P . R
By: ALI AKRAM Airport Road | Bahria Town | Johar Town
___________________________________________________________________________________________________
Topic 3: Mark Scheme Computer Science Paper 3 Topical
A microprocessor is used to
control a washing machine. MISD
11 (a)(i) A B X 1
0 0 1
0 1 1
1 0 1
1 1 0
(a)(ii) A B C X 1
0 0 0 1
0 0 1 1
0 1 0 1
0 1 1 1
1 0 0 1
1 0 1 1
1 1 0 1
1 1 1 0
(b)(i) 3
S R Q Q
Initially 1 0 0 1
R changed to 1 1 1 0 1 1
S changed to 0 0 1 1 0 1
S changed to 1 1 1 1 0 1
S and R changed to 0 0 0 1 1
(c)(ii) • S-R flip-flop has an invalid combination of S and R // The S_R flip flop 2
allows both Q and Q to have the same value // S-R flip-flop inputs
may arrive at different times 1
• The J-K flip-flop does not allow for Q and Q to have the same value //
All four combination of values for J and K are valid // J-K flip-flop
incorporates a clock pulse for synchronisation 1
CISC
Emphasis is on the
hardware rather than
the software.
It makes extensive
use of general RISC
purpose registers.
Many instruction
formats are available.
(c)(ii) The third instruction is not dependent on the first two, therefore, instruction 2 1
and 3 need to be swapped
13 (a)(i) Because a valid unsigned integer can be two digits / one or more digits (1) 2
Both 3 and 2 are digits (1)
<unsigned_integer>.<unsigned_integer> (1)
<unsigned_integer> ::=
<digit> | (1)
(c)(i) 4
Un
nsigned Unsigned
U
In
nteger
. Integer A
+ MP3
3 MP4
MP2
Unsigned
A E
integer
−
B MP1
Alternative correct an
nswer:
MP3 need ds both the sign ‘box’ a
and the sign or the markk
n diagram fo
Siggn Unsigned
E
intteger
Sign:
+
14 (a) A B X 1
0 0 1
0 1 0
1 0 0
1 1 0
(b) Q 4
S R Q
Initially 1 0 1 0
S changed to 0 0 0 1 0 (1)
R changed to 1 0 1 0 1 (1)
R changed to 0 0 0 0 1 (1)
S and R changed to 1 1 1 0 0 (1)
Problem 1
• One combination of S and R gives NOT valid / indeterminate output // Q
and Q have the same value
• The JK flip-flop does not allow for Q and Q to have the same value for
any combination of inputs // Q and Q have to be complementary
Problem 2
• Inputs may not arrive at the same time
• The JK flip-flop has a clock pulse to synchronise inputs
AB
00 01 11 10
0 0 1 0 1
C 1 0 1 0 1
AB
00 01 11 10
0 0 1 0 1
C 1 0 1 0 1
AB
00 01 11 10
00 0 1 1 0
01 0 1 1 0
CD 11 0 1 0 0
10 0 1 0 0
AB
00 01 11 10
0 0 0 1 0
C
1 0 1 1 1
AB
00 01 11 10
0 0 0 1 0
C
1 0 1 1 1
(a)(iv) 1 mark for each pair. Allow follow through from (iii) 3
• A.B
• + B.C
• + A.C
X = A.B + B.C + A.C
1 mark for 2 correct rows or columns, 2 marks for 4 correct rows or columns
(based on headings)
AB
00 01 11 10
00 0 1 1 0
01 0 0 1 0
CD
11 0 0 1 0
10 0 0 1 0
AB
00 01 11 10
00 0 1 1 0
01 0 0 1 0
CD
11 0 0 1 0
10 0 0 1 0
• A.B
• + B.C.D
X = A.B + B.C.D
For example:
X = A.C + A.B
(
X = A. C + B ) Correct answer
X = A.C + A.B.C
(
X = A. C + B.C ) Redundancy Law
A B C X
0 0 0 0
0 0 1 0
1 mark
0 1 0 0
0 1 1 0
1 0 0 1
1 0 1 0 1 mark
1 1 0 1
1 1 1 1
00 01 11 10
0 0 0 1 1
C
1 0 0 1 0
00 01 11 10
0 0 0 1 1
C
1 0 0 1 0
1 mark for 2 correct rows or columns, 2 marks for 4 correct rows or columns
(based on headings)
AB
00 01 11 10
00 0 1 1 0
01 0 0 1 0
CD
11 0 0 1 0
10 0 0 1 0
AB
00 01 11 10
00 0 1 1 0
01 0 0 1 0
CD
11 0 0 1 0
10 0 0 1 0
Time interval
Stage 1 2 3 4 5 6 7 8 9
Fetch instruction A B C D
Decode instruction A B C D
Execute instruction A B C D
Architecture
Statement
SIMD MIMD SISD
19 (a) NOR 1
A B Working Space X Y
0 0 0 0
0 1 0 1
1 0 0 1
1 1 1 0
(
= A.B. C.D + C.D + C.D + C.D + A.C.D. B + B ) ( )
• Taking A.B and A.C.D outside brackets (Associative Law)
( ( ) (
= A.B. C. D + D + C. D + D + A.C.D. B + B )) ( )
• ( ) ( )
Grouping C. D + D + C. D + D (Associative Law and Commutative
Law)
( )
= A.B. C. (1) + C. (1) + A.C.D. (1)
= A.B + A.C.D
• Reducing first four terms to A.B and reducing last two terms to A.C.D
(Use of Identity Law)
20 (a)(i) AB 1
00 01 11 10
0 1 1 0 1
C
1 1 1 0 1
1 1 1 0 1
X=A+B
(b)(i) 1 mark correct values and order of row and column headings 4
AB
00 01 11 10
00 0 0 1 1
01 0 0 1 1
CD 11 1 1 0 0
10 1 1 0 0
AB
00 01 11 10
00 0 0 1 1
01 0 0 1 1
CD
11 1 1 0 0
10 1 1 0 0
• A.C
• + A.C
X = A.C + A.C
Statement RISC
Pipelining is easier 9
Multi-cycle instructions 9
00 01 11 10
0 1 0 0 0
C
1 1 1 1 1
00 01 11 10
0 1 0 0 0
C
1 1 1 1 1
• A.B
• +C
X = A.B + C // X = C + A.B
Description Term
24 (a)(i) 1 mark for each 2 correct products, i.e. 3 marks for 6, 2 marks for 4 or 5, 1 mark 3
for 2 or 3
. . . . . . . . . . . .
AB
00 01 11 10
0 1 1 0 1
C 1 1 1 0 1
•
• +
//
(b) . 3
(ii) e.g.
no need to acquire client hardware for testing /
reduces set-up time for test system /
common development system for all developers 1
(iii) e.g.
software emulation runs slower than real hardware /
not possible to emulate some hardware 1
2 (a)
Token
Symbol
Value Type
Counter 60 variable
1.5 61 constant
(b)
6 0 6 5 6 4 6 0 6 4 6 0 6 0 6 4
0 1 1 1 2 A 0 3 2 B 2 1 2 2 3 C [1+1]
1 mark for first 2 lines, 1 mark for last 2 lines, with no other lines added
(iii) Code has fewer instructions / occupies less space in memory when executed [1]
minimises execution time of code // code will execute faster [1]
By: ALI AKRAM Airport Road | Bahria Town | Johar Town
___________________________________________________________________________________________________
Topic 4: Mark Scheme Computer Science Paper 3 Topical
ready, running:
process is capable of using processor (ready state) [1]
OS allocates processor to process so that process can execute (running state) [1]
running, blocked:
process is executing (running state) when it needs to perform I / O operation [1]
placed in blocked state – until I / O operation completed [1]
4 (a)
Token
Symbol
Value Type
Start 60 Variable
0.1 61 Constant
10 63 Constant [1+1]
(b)
60 01 61 4E 62 01 60 50 63 52 62 02 60 53
[1+1]
(d) (i) Minimise the execution time // code runs faster [1]
(ii) Compiler could calculate 2*6 and replace it with the value 12. [1]
6 (a)
Statement Compilation stage
1 mark
This stage could be ignored Syntax analysis
for each
correct
This stage checks the line
grammar of the program Code generation
code
(ii) A – [1]
B/4* [1]
CD–/ [1]
(c) (i)
4 3
1
1 1 5 5 2 mark
per ring
2 2 2 2 2 2 4
+ – *
[4]
(ii) x * [1]
(w + z – y) [1]
Order must be correct for both parts
(ii)
Page Presence Page frame Additional data
Flag address
4 1 542 12:07:34:49 [1 +1 + 1]
(iv)
Page Presence Page frame Additional data
Flag address
3 1 132 0 [1 +1 + 1]
Least used: a page just entered has a low least used value … [1]
so likely to be a candidate for immediately being swapped out [1]
8 (a)
Statement Compilation stage
1
This stage produces
Syntax analysis mark for
object code.
each
correct
line
This stage makes use
Code generation
of tree data structures.
(b) P Q + [1]
RS/ – [1]
(c) (i)
2
3 3 5
1
2 1 1 1 1 6 mark
per ring
2 2 4 4 4 4 4 4 –2
* + + –
[4]
(ii) b * a [1]
– (c + d + a) [1]
Order must be correct for both parts
(iii) Rules of precedence means different operators have different priorities // by example
multiply is done before add [1]
In RPN evaluation of operators is left to right // operators are used in the sequence in
which they are read [1]
No need for brackets // infix may require the use of brackets [1]
[Max 2]
(ii) When there is an attempt to load an instruction for a page not in memory [1]
A page fault occurs // Page 5 finishes … [1]
this generates an interrupt [1]
ISR code is executed [1]
Causes the OS to load page 6 into memory [1]
[Max 3]
(ii)
Page Presence Page frame address Additional data
Flag
6 1 221 12:07:34:49 [1 + 1 + 1]
(iii) When the procedure call is made – Page 1 is swapped out and Page 3 is swapped in [1]
At the end of the procedure call – Page 3 is swapped out and Page 1 is swapped in [1]
Page 1/3 is always in memory shortest amount of time [1]
The entire sequence is repeated for every iteration [1]
[Max 3]
(a)(ii) The second operand should be an unsigned integer and not a variable 1
(a)(iii) A32 is not a variable, as a variable should be a letter followed by a single digit 1
<digit> <unsigned_integer> 1
<letter> ::= A | B | C 1
<operator> ::= + | - | * | ^
(c) Variable 2
For example:
<letter>|<letter><variable>
<letter>|<variable><letter>
(a)(iii) There are two operators (only one is allowed) // three variables on the right hand 1
side but only two allowed
variable
letter unsigned integer
• The only
• Required resource becomes available // event is complete
• to allow multiprogramming
• to give each process a fair share of the CPU time
• to allow all processes to complete in a reasonable amount of time
• to allow highest priority jobs to be executed first
• to keep the CPU busy all the time
• to service the largest possible number of jobs in a given amount of time
• to minimize the amount of time users must wait for their results
• to maximise the use of peripherals
Token
Symbol
Value Type
Start 60 Variable
1 61 Constant
Number 62 Variable
Counter 63 Variable
12 64 Constant
60 01 61 51 62 4E 63 01 60 50 64 52 62 02 63 53
(d)(i) shortens execution time of program// time taken to execute whole program 1
decreases
• LDD 236
ADD 237
STO 512
ADD 238
STO 513
ADD 239
STO 514
Token
Symbol
Value Type
Number1 60 Variable
Number2 61 Variable
Answer 62 Variable
10 63 Constant//Literal
0 64 Constant//Literal
51 60 51 61 51 62 4A 62 03 60 02 61 4B 52 63 4D 52 64 4C
d) 4
1 1 3 3 2
2 2 2 2 6 6 9 9 7
(a) 1 mark for 2 correct rows, 2 marks for 3 correct rows, 3 marks for 4 correct 3
rows
Token
Symbol
Value Type
Counter 60 Variable
0 61 Constant
Password 62 Variable
"Cambridge" 63 Constant
1 64 Constant
(b) 2
60 01 First two cells given in question.
61 51 62
4E 4A 62 04 63 4B 51 62 4C 60 ....
.... 01 60 02 64 4F 62 03 63 52 60
LDD 236
ADD 237
STO 236
ADD 238
STO 238
2 2 6
5 3 30 30 5
8 8 24 24 24 24 19
• Ready
• The process is not being executed
• The process is in the queue«
• « waiting for the processor’s attention / time slice
• Running
• The process is being executed by the processor
• The process is currently using its allocated processor time / time slice
• Blocked
• The process is waiting for an event «
• « so it cannot be executed at the moment
• «e.g. input/output
Memory
• Moving frequently accessed instructions to cache (1) for faster recall (1) as
SRAM is used rather than DRAM for cache (1)
• Making use of virtual memory (1) with paging or segmentation (1) to swap
memory to and from a disk (1)
• Partitioning memory (1) dividing main memory into static/dynamic partitions
(1) to allow for more than one program/task to be available
//multiprogramming (1)
• Removing unused items/tasks from RAM (1) by marking a partition as
available (1) as soon as the process using it has terminated (1)
Disk
• Disk caching (1) a disk cache holds data that is frequently transferred
to/from the disk (1) the cache can be held on disk or in RAM (1)
• Compression utility (1) decreasing the size of a file stored on disk (1) in
order fit more / larger files on the disk (1)
• Defragmentation utility (1) files are rearranged to occupy contiguous disk
space (1) this reduces the time taken to access files// decreases latency (1)
<operator>::=
• == | > | <
<number>::=
• <digit><digit>
<variable>::=
• <letter>
• |<letter><variable>
<condition>::=
• <variable><operator><number>
• |<variable><operator><variable>
Page:
• Virtual Memory is divided into blocks of a fixed size
Page frame:
• the main memory is divided into page frames of the same size as a
page
Page table:
• the Page (Map) table shows the mapping of pages to page frames
(b) 1 mark per bullet point to max 3 3
(c)
A signal from a software source or hardware device seeking the attention 1
of the processer
• JOB32
• JOB42
• JOB42
• Pages are required back in RAM as soon as they are moved to disk
• There is continuous swapping (of the same pages)
• No useful processing happens // deadlock
• (because) pages that are in RAM and on disk are inter-dependent
• (nearly) all processing time is used for swapping pages
(a)(iv) The white space removed // redundant characters are removed // removal of 1
comments // identification of errors
1 D A Phishing 1
B Virus 1
C a standalone piece of software which can reproduce itself automatically 1
D sending unsolicited emails to a distribution list 1
Total: 12
(a)
Description Term
(ii) Asymmetric keys means that the key used to encrypt (public key) is different from the
key used to decrypt (private key) [1]
Ben acquires Mariah’s public key [1]
Ben encrypts email … [1]
using Mariah’s public key [1]
Ben sends encrypted email to Mariah [1]
Mariah decrypts email … [1]
Using her private key [1]
[Max 4]
3 (a)(i) Worm 1
(a)(ii) Phishing 1
(c)(i) public 1
4 (a)(i) Pharming 1
(a)(ii) Phishing 1
(b) No up-to-date anti-virus (or equivalent) software (used) / Regular virus scans not 2
performed
No firewall
Operating system not up-to-date/obsolete
Attachments/suspicious links in emails clicked on
Clicking on website with an out of date security certificate
max 2
(c)(iii) Need to know that the certificate is genuine (and has not been altered) 1
// Authenticate or verify it (came from the CA)
Pharming
• Use a reliable ISP //check URL is spelt correctly // check that http has
changed to https //security software installed and kept updated // only
accept valid public key certificates // check that links are genuine
Phishing
• ignore email // delete email // don’t click on links in emails
Description Term
The type of cryptography where different keys are used, one for
B Asymmetric or Public key
encryption and one for decryption.
Key needed to decrypt data that has been encrypted by a public key
// Key needed to encrypt data so that it that can be decrypted by a
D Private key
public key
// the key used in asymmetric encryption which is not shared
• Keys
• Cipher text
• Manager’s public and private keys in correct spaces
• Wiktor’s public and private keys in correct spaces
• Plain text
When the manager replies, the message is encrypted using Wiktor’s public
key, and when Wiktor receives the message, it is decrypted into plain text
using his private key.
(c) 1 mark for type of malware and 1 mark for prevention, max 2 (x 2) 4
For example:
• Virus
• Have company policies to ensure that anti-virus software is installed,
regularly updated and run
• Spyware
• Have company policies to ensure that anti-spyware software is
installed, regularly updated and run
• Phishing
• Have network policies to ensure that the firewall criteria include SPAM
filters, whitelist, blacklist etc.
• Serial number
• Identification of Certificate Authority (that issued the certificate)
• Version (number)
• Valid from // start date
• Valid to // end date
• Subject name (name of user/owner/computer/network device)
• Subject's public key
• Hashing algorithm
• Algorithm used to create signature
• Algorithm used to hash certificate
• Hashed certificate
(c) (i) output of system (alter temperature / light level / soil moisture)
affects input from sensors
continuous 3
(ii) min / max / ideal / mean / extreme temperature // sampling rate // tolerance 1
interval
Total: 18
(b) System wastes processor time checking for values that are not changing 1 2
Some sensor input needs to be acted upon immediately 1
(c)(i) Interrupts need to be disabled so that the process of dealing with an interrupt is 1
itself not interrupted
(c)(ii) After handling the interrupt interrupts need to be enabled so that further 1
interrupts can be dealt with
(a)(ii) There is no element of ‘control’ in the system // the system does not alter 1
conditions in the building if sensors triggered
(a)(ii) System is controlling devices // turns heaters on and off // use of actuators 1
maintain the environment // makes use of feedback
(b) Computer/microprocessor 4
« to process the sensor readings
Analogue to digital convertor
« Sensor produces analogue signal but processor requires digital data
Digital to analogue convertor
« Processor produces digital signal but actuator may require analogue sign
Actuator
« May be required to turn heater on or off
1 mark for device, 1 mark for justification, max 2 devices
5 (a) One mark for suitable sensor, one mark for justification 2
Max one sensor, max two marks
humidity
« to ensure that the plants have the right level of moisture in the air
pressure / proximity
« to detect whether the windows are open or closed condone ‘check’
moisture
« to ensure the water levels in the soil are correct
light
« to ensure the light levels in the greenhouse are correct for plant growth
« to ensure the windows are closed when night falls
Accept CO2 sensor for one mark only, accept gas or O2 for one mark only
Justification needs to answer the question why? Not just describe the sensor
• Which in turn may cause a change in the actions taken by the system //
or by example
(d)(i) 20 1
1 mark for #8
(b) 1 mark for identifying hardware, 1 for purpose to max 4 for 2 hardware 4
devices
For example:
• actuator/relay/switch (1) to turn a heater/fan on or off (1)
• heater (1) to heat the museum (1)
• fan (1) to cool the museum (1)
• analogue to digital converter (1) to convert analogue signal from sensor
to a digital value that can be stored/manipulated (1)
• transmission hardware//cable (1) to transfer data/signals (1)
• processor (1) to manage the temperature control (1)
• Visible/audible warning device (1) to give warning to a human if
temperature is at a dangerous level (1)
7 6 5 4 3 2 1 0
1 1 1 0 1 1 1 0 0 0 0 1 0 0 0 0
Byte 1 Byte 2
7 (a) 2 marks for all 5 single lines correct, 1 mark for 4 lines correct otherwise zero 2
Scenario System
Aeroplane autopilot
Control
Rollercoaster
Monitoring
(b) 1 mark for identifying hardware, 1 for purpose to max 6 for 3 hardware devices 6
• Byte 1: 10010000
• Byte 2: 11111110
• LDD 6753
• OR #B00010000 / #16 / #&10
• STO 6753
For example:
9 1 mark for identifying hardware, 1 mark for the purpose to max 2 hardware 4
devices.
• Moisture sensor «
• « to measure the level of moisture in the soil
• Humidity sensor «
• «to measure the level of moisture in the air
• Pressure/Precipitation sensor «
• «to measure the amount of rainfall
• Actuator «
• «to turn the sprinklers on/off
• Monitoring only gathers information but control systems also perform actions
• Output in a control system can affect the input
• There is no feedback in a monitoring system // a control system relies on
feedback
• Example of monitoring applied to the weather station