0% found this document useful (0 votes)
34 views16 pages

9608/31/o/n/16 © Ucles 2016

Uploaded by

hannahrufaro4
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
34 views16 pages

9608/31/o/n/16 © Ucles 2016

Uploaded by

hannahrufaro4
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 16

QUESTION 1.

3 A computer operating system (OS) uses paging for memory management.

In paging:

• main memory is divided into equal-size blocks, called page frames


• each process that is executed is divided into blocks of the same size, called pages
• each process has a page table that is used to manage the pages of this process

The following table is the incomplete page table for a process X.

Page Presence Page frame address Additional data


flag
1 1 132
2 1 245
3 1 232
4 0 0
5 1 542
6 0 0

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.

(a) The page frame address entry for Page 2 is 245.

State what the value 245 could represent.

.............................................................................................................................................. [1]

(b) Process X executes until the next instruction is the first instruction in Page 4. Page 4 is not
currently in main memory.

State a hardware device that could be storing this page.

.............................................................................................................................................. [1]

© UCLES 2016 9608/31/O/N/16


7

(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.

The page that is to be replaced is determined by a page replacement algorithm.

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).

Page Presence Page frame address Additional data


flag

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).

Page Presence Page frame address Additional data


flag

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.

Longest resident .......................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

Least used ................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

.............................................................................................................................................. [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]

(ii) State the name given to this logic circuit.

...................................................................................................................................... [1]

(iii) Name the labels usually given to A and B.

Label A ..............................................................................................................................

Label B ..............................................................................................................................

Explain why your answers are more appropriate for the A and B labels.

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...................................................................................................................................... [4]

© UCLES 2016 9608/31/O/N/16


QUESTION 2. 6

3 A computer operating system (OS) uses paging for memory management.

In paging:

• main memory is divided into equal-size blocks, called page frames


• each process that is executed is divided into blocks of the same size, called pages
• each process has a page table that is used to manage the pages of this process

The following table is the incomplete page table for a process, Y.

Page Presence Page frame address Additional data


flag
1 1 221
2 1 222
3 0 0
4 0 0
5 1 542
6 0 0

249 0 0

(a) State two facts about Page 5.

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.

The page that is to be replaced is determined by a page replacement algorithm.

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).

Page Presence Page frame address Additional data


flag

6 …………. ………..…… …………………….……

[3]

© UCLES 2016 9608/32/O/N/16 [Turn over


8

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]

(iv) Name the condition described in part (c)(iii).

...................................................................................................................................... [1]

4 Both clients and servers use the Secure Socket Layer (SSL) protocol and its successor, the
Transport Layer Security (TLS) protocol.

(a) (i) What is a protocol?

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...................................................................................................................................... [2]

(ii) Name the client application used in this context.

...................................................................................................................................... [1]

(iii) Name the server used in this context.

...................................................................................................................................... [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

3 A computer operating system (OS) uses paging for memory management.

In paging:

• main memory is divided into equal-size blocks, called page frames


• each process that is executed is divided into blocks of the same size, called pages
• each process has a page table that is used to manage the pages of this process

The following table is the incomplete page table for a process X.

Page Presence Page frame address Additional data


flag
1 1 132
2 1 245
3 1 232
4 0 0
5 1 542
6 0 0

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.

(a) The page frame address entry for Page 2 is 245.

State what the value 245 could represent.

.............................................................................................................................................. [1]

(b) Process X executes until the next instruction is the first instruction in Page 4. Page 4 is not
currently in main memory.

State a hardware device that could be storing this page.

.............................................................................................................................................. [1]

© UCLES 2016 9608/33/O/N/16


7

(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.

The page that is to be replaced is determined by a page replacement algorithm.

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).

Page Presence Page frame address Additional data


flag

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).

Page Presence Page frame address Additional data


flag

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.

Longest resident .......................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

Least used ................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

.............................................................................................................................................. [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]

(ii) State the name given to this logic circuit.

...................................................................................................................................... [1]

(iii) Name the labels usually given to A and B.

Label A ..............................................................................................................................

Label B ..............................................................................................................................

Explain why your answers are more appropriate for the A and B labels.

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...................................................................................................................................... [4]

© UCLES 2016 9608/33/O/N/16


QUESTION 4. 14

(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]

(ii) Explain your answer to part (i).

...........................................................................................................................................

.......................................................................................................................................[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]

© UCLES 2017 9608/31/M/J/17


15

(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.

Interrupt 1. Disable interrupts

2. Save current task

3. Identify source of
interrupt

4. Jump to Interrupt
Service Routine

5. Restore task

Return to task 6. Enable interrupts

(i) State the purpose of step 1.

...........................................................................................................................................

...........................................................................................................................................

.......................................................................................................................................[1]

(ii) State the purpose of step 6.

...........................................................................................................................................

...........................................................................................................................................

.......................................................................................................................................[1]

(iii) Explain how the current task is saved in step 2.

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

.......................................................................................................................................[2]

© UCLES 2017 9608/31/M/J/17 [Turn over


QUESTION 5. 10

5 A computer process can be in one of three states: running, ready or blocked.

(a) Explain how the processes are affected when the following events take place.

(i) The running process needs to read a file from a disk.

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

.......................................................................................................................................[2]

(ii) The running process uses up its time slice.

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

.......................................................................................................................................[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]

© UCLES 2018 9608/31/O/N/18


11

(c) Give three reasons why process scheduling is needed.

1 ................................................................................................................................................

...................................................................................................................................................

2 ................................................................................................................................................

...................................................................................................................................................

3 ................................................................................................................................................

...................................................................................................................................................
[3]

© UCLES 2018 9608/31/O/N/18 [Turn over


QUESTION 6. 9

6 (a) An operating system (OS) uses a memory management technique called paging.

Explain what is meant by the following terms.

Page .........................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

Page frame ...............................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

Page table ................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................
[3]

(b) Explain why an operating system needs to use scheduling algorithms.

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

............................................................................................................................................. [3]

(c) State what is meant by an interrupt.

...................................................................................................................................................

............................................................................................................................................. [1]

© UCLES 2019 9608/31/O/N/19 [Turn over


10

(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:

JOB21 – JOBSS – JOBPT – JOB32 – JOB42, then return to JOB21

Process JOB32 has just completed its time-slice.

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

................................................ .

Copy the saved registers for ................................................ to the CPU.

The processor will now process ................................................ .


[3]

© UCLES 2019 9608/31/O/N/19


QUESTION 7. 7

4 Physical memory is managed using virtual memory and paging.

(a) Describe what is meant by virtual memory.

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

............................................................................................................................................. [2]

(b) (i) Explain how paging is used to manage virtual memory.

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

..................................................................................................................................... [4]

(ii) Give a suitable page replacement algorithm for this process.

..................................................................................................................................... [1]

(iii) One drawback of using virtual memory is disk thrashing.

Describe what is meant by the term disk thrashing.

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

..................................................................................................................................... [2]

© UCLES 2019 9608/32/O/N/19 [Turn over

You might also like