Chapters 3.1, 3.2 & 3.3 (Year 11 To Year 13) : This Document Consists of 14 Pages
Chapters 3.1, 3.2 & 3.3 (Year 11 To Year 13) : This Document Consists of 14 Pages
Chapters 3.1, 3.2 & 3.3 (Year 11 To Year 13) : This Document Consists of 14 Pages
Page 1
8) The following are the first few lines of a source code program written in high-level language
XYZ which is about to be translated by the language compiler.
(a) During the lexical analysis stage the compiler will use a keyword table and a symbol
table.
(i) Describe what information is contained in these tables.
(A)Keyword table
(B) Symbol table [2]
(ii) Explain how the table contents are used to translate the source code. [2]
(iii) Describe one other task done at the lexical analysis stage which does not involve
the use of the keyword table or symbol table. [1]
(b) The final stage of compilation is code optimisation.
(i) Explain what is meant by code optimisation. [2]
(ii) Give one practical example of code which would benefit from optimising. [1] (MJ/13/P32/Q5)
9) A multiprogramming, multi-user operating system organises the available memory into two
fixed sized partitions.
Partition 1 size 30 Gb is used only for batch processing
Partition 2 size 40 Gb is used only for interactive processing at a terminal
A program, once loaded, occupies the same memory locations until its execution is
complete.
(a) Explain what is meant by:
(i) Batch processing [3]
(ii) Interactive processing [1]
(b) The diagram shows the current contents of main memory with a list of programs
waiting to be scheduled.
Page 2
Page 3
(b) A network of computers has a single printer. Each of the computers can send a job for
printing at any time. Explain how a print spooler can be used to control the printing of jobs on the
network. [4]
(ON/11/P32/Q1)
11(a) Describe the use of the following special purpose registers and how they change
during the fetch-execute cycle.
(i) Memory Address Register (MAR) [3] (ii) Index Register (IR) [3]
(b) Explain how the address bus and the data bus are used in a computer. [3] (ON/11/P32/Q2)
12) Explain how scheduling manages job throughput in a computer. [6] (ON/11/P32/Q6)
13) (a) (i) Describe what happens during the syntax analysis phase of compilation. [4]
(ii) Explain how syntax errors are identified during compilation. [3]
(b) (i) Give two advantages of using a compiler rather than an interpreter to translate a
high-level language program. [2]
(ii) Describe an advantage of using an interpreter rather than a compiler to translate a
high-level language program. [2] (ON/11/P32/Q9)
14) (a) The sequence of operations below show - in register transfer notation - the fetch stage
of the fetch-execute cycle.
Note:
[register] denotes the contents of the specified register
Step 1 above is read as The contents of the Program Counter are copied to the
Memory Address Register.
(i) Describe what is happening at step 4. [1]
(ii) Explain how the data bus is used at step 3. [1]
(iii) Explain how the address bus is used at step 3. [1]
(b) A programmer writing low-level code has the choice of using either machine code or
assembly language.
(i) Describe two advantages of using assembly language. [2]
(ii) Describe three specific tasks done by the assembler software. [3]
(c) A low-level language contains instructions for direct addressing and relative
addressing.
Explain these terms. You may wish to illustrate your answers with a diagram.
(i) Direct addressing [2]
(ii) Relative addressing [2] (ON/12/P32/Q3)
Page 4
15) The two types of software which are used to translate high-level language programs are a
compiler and an interpreter.
(a) A source code program is compiled for the first time.
State two outputs that could be produced by the compiler. [2]
(b) Describe two benefits of using a compiler (rather than an interpreter). [2]
(c) Explain what is meant by code optimisation. [3]
(d) Explain why the following system software may be required to produce the final
executable file.
(i) Linker [1] (ii) Loader [1] (ON/12/P32/Q4)
16) (a) Multiprogramming is the ability to have more than one program loaded in the main
memory at the same time.
The operating system for a computer which supports multiprogramming must contain a
program module for management of the main memory.
Describe two strategies for memory management. [4]
(b) In a multiprogramming computer system, describe two possible strategies for
scheduling the use of the processor. [4]
(c) (i) Describe what is meant by an interrupt. [2]
(ii) State two different sources of an interrupt and give a reason for each interrupt. [4] (ON/12/P32/Q6)
17) On page 12, 13 & 14 (ON/13/P32/Q3)
Page 5
Page 6
Page 7
Page 8
Page 7
Page 9
Page 10
Page 11
[5]
Page 12
Page 13
Page 14