9608/31/o/n/16 © Ucles 2016
9608/31/o/n/16 © Ucles 2016
In paging:
135 0 0
When a particular page of the process is currently in main memory, the Presence flag entry in the
page table is set to 1.
If the page is not currently present in memory, the Presence flag is set to 0.
.............................................................................................................................................. [1]
(b) Process X executes until the next instruction is the first instruction in Page 4. Page 4 is not
currently in main memory.
.............................................................................................................................................. [1]
(c) When an instruction to be accessed is not present in main memory, its page must be loaded
into a page frame. If all page frames are currently in use, the contents of a page frame will be
overwritten with this new page.
One possible algorithm is to replace the page that has been resident in main memory for the
longest time.
(i) Give the additional data that would need to be stored in the page table.
...........................................................................................................................................
..................................................................................................................................... [1]
(ii) Complete the table entries below to show what happens when Page 4 is swapped into
main memory. Assume that Page 5 is the one to be replaced.
In the final column, give an example of the data you have identified in part (c)(i).
4
............... .................... .....................................
[3]
An alternative algorithm is to replace the page that has been used least.
(iii) Give the different additional data that the page table would now need to store.
...........................................................................................................................................
...................................................................................................................................... [1]
(iv) In the following table, complete the missing data to show what happens when Page 3 is
swapped into main memory. Assume that Page 1 is the one to be replaced.
In the final column, give an example of the data you have identified in part (c)(iii).
3
............... .................... .....................................
[3]
© UCLES 2016 9608/31/O/N/16 [Turn over
8
(d) Explain why the algorithms given in part (c) may not be the best choice for efficient memory
management.
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
.............................................................................................................................................. [4]
4 (a) (i) Complete the truth table for this logic circuit.
X Input Output
A X Y A B
Y 0 0
0 1
1 0
B 1 1
[2]
...................................................................................................................................... [1]
Label A ..............................................................................................................................
Label B ..............................................................................................................................
Explain why your answers are more appropriate for the A and B labels.
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...................................................................................................................................... [4]
In paging:
249 0 0
1 ................................................................................................................................................
...................................................................................................................................................
2 ................................................................................................................................................
.............................................................................................................................................. [2]
(b) Process Y executes the last instruction in Page 5. This instruction is not a branch instruction.
(i) Explain the problem that now arises in the continued execution of process Y.
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...................................................................................................................................... [2]
© UCLES 2016 9608/32/O/N/16
7
(ii) Explain how interrupts help to solve the problem that you explained in part (b)(i).
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...................................................................................................................................... [3]
(c) When the next instruction is not present in main memory, the OS must load its page into a
page frame. If all page frames are currently in use, the OS overwrites the contents of a page
frame with the required page.
One possible algorithm is to replace the page which has been in memory the shortest amount
of time.
(i) Give the additional data that would need to be stored in the page table.
...........................................................................................................................................
...................................................................................................................................... [1]
(ii) Complete the table entry below to show what happens when Page 6 is swapped into
main memory. Include the data you have identified in part (c)(i) in the final column.
Assume that Page 1 is the one to be replaced.
In the final column, give an example of the data you have identified in part (c)(i).
[3]
Process Y contains instructions that result in the execution of a loop, a very large number of
times. All instructions within the loop are in Page 1.
The loop contains a call to a procedure whose instructions are all in Page 3.
All page frames are currently in use. Page 1 is the page that has been in memory for the
shortest time.
(iii) Explain what happens to Page 1 and Page 3, each time the loop is executed.
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...................................................................................................................................... [3]
...................................................................................................................................... [1]
4 Both clients and servers use the Secure Socket Layer (SSL) protocol and its successor, the
Transport Layer Security (TLS) protocol.
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...................................................................................................................................... [2]
...................................................................................................................................... [1]
...................................................................................................................................... [1]
(iv) Identify two problems that the SSL and TLS protocols can help to overcome.
1 ........................................................................................................................................
2 ................................................................................................................................... [2]
© UCLES 2016 9608/32/O/N/16
QUESTION 3. 6
In paging:
135 0 0
When a particular page of the process is currently in main memory, the Presence flag entry in the
page table is set to 1.
If the page is not currently present in memory, the Presence flag is set to 0.
.............................................................................................................................................. [1]
(b) Process X executes until the next instruction is the first instruction in Page 4. Page 4 is not
currently in main memory.
.............................................................................................................................................. [1]
(c) When an instruction to be accessed is not present in main memory, its page must be loaded
into a page frame. If all page frames are currently in use, the contents of a page frame will be
overwritten with this new page.
One possible algorithm is to replace the page that has been resident in main memory for the
longest time.
(i) Give the additional data that would need to be stored in the page table.
...........................................................................................................................................
..................................................................................................................................... [1]
(ii) Complete the table entries below to show what happens when Page 4 is swapped into
main memory. Assume that Page 5 is the one to be replaced.
In the final column, give an example of the data you have identified in part (c)(i).
4
............... .................... .....................................
[3]
An alternative algorithm is to replace the page that has been used least.
(iii) Give the different additional data that the page table would now need to store.
...........................................................................................................................................
...................................................................................................................................... [1]
(iv) In the following table, complete the missing data to show what happens when Page 3 is
swapped into main memory. Assume that Page 1 is the one to be replaced.
In the final column, give an example of the data you have identified in part (c)(iii).
3
............... .................... .....................................
[3]
© UCLES 2016 9608/33/O/N/16 [Turn over
8
(d) Explain why the algorithms given in part (c) may not be the best choice for efficient memory
management.
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
.............................................................................................................................................. [4]
4 (a) (i) Complete the truth table for this logic circuit.
X Input Output
A X Y A B
Y 0 0
0 1
1 0
B 1 1
[2]
...................................................................................................................................... [1]
Label A ..............................................................................................................................
Label B ..............................................................................................................................
Explain why your answers are more appropriate for the A and B labels.
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...................................................................................................................................... [4]
(iii) Explain how the use of circuit switching overcomes the problems you have identified in
part (i).
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
.......................................................................................................................................[3]
6 A computer system is used to manage some of the functions in a vehicle. The vehicle has a
number of sensors and actuators. One sensor is used to monitor the moisture on the screen. If the
moisture exceeds a pre-set value, the windscreen wiper motor turns on automatically.
The software used in the computer system is dedicated to the sensor management functions.
When the system starts, the software runs some initial tasks. It then loops continuously until the
system is switched off.
(a) (i) State the name given to the type of system described.
.......................................................................................................................................[1]
...........................................................................................................................................
.......................................................................................................................................[1]
(b) Within the software loop, the value of each sensor is read in turn. The value read from the
sensor is then processed.
State two drawbacks with this method of reading and processing sensor data.
Drawback 1 ...............................................................................................................................
...................................................................................................................................................
Drawback 2 ...............................................................................................................................
...................................................................................................................................................
[2]
(c) An alternative method of reading and processing sensor data is to use interrupts. Each sensor
is connected so that it can send an interrupt signal to the processor if its value changes.
On receipt of an interrupt signal, the processor carries out a number of steps as shown in the
following diagram.
3. Identify source of
interrupt
4. Jump to Interrupt
Service Routine
5. Restore task
...........................................................................................................................................
...........................................................................................................................................
.......................................................................................................................................[1]
...........................................................................................................................................
...........................................................................................................................................
.......................................................................................................................................[1]
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
.......................................................................................................................................[2]
(a) Explain how the processes are affected when the following events take place.
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
.......................................................................................................................................[2]
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
.......................................................................................................................................[2]
(b) (i) State the conditions that are necessary for a process to move from the ready to the
running state.
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
.......................................................................................................................................[2]
(ii) State the conditions that are necessary for a process to move from the blocked to the
ready state.
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
.......................................................................................................................................[2]
1 ................................................................................................................................................
...................................................................................................................................................
2 ................................................................................................................................................
...................................................................................................................................................
3 ................................................................................................................................................
...................................................................................................................................................
[3]
6 (a) An operating system (OS) uses a memory management technique called paging.
Page .........................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
[3]
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
............................................................................................................................................. [3]
...................................................................................................................................................
............................................................................................................................................. [1]
(d) For a computer system using multi-programming, the low-level scheduler decides which
process will get next use of the processor.
One algorithm could be a round-robin, which means every process gets use of the processor
in sequence for a fixed amount of time (time-slice).
For a round-robin algorithm, five processes are currently loaded and get the use of the
processor in the sequence:
The following paragraph describes what happens next. Complete the paragraph by inserting
the missing processes.
Interrupt received from the low-level scheduler. Save all register contents for
................................................ .
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
............................................................................................................................................. [2]
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
..................................................................................................................................... [4]
..................................................................................................................................... [1]
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
..................................................................................................................................... [2]