Exam

Page 1

CS/250/5/AS07

UNIVERSITY OF SURREY Š

B. Sc. Undergraduate Programmes in Computing B. Sc. Undergraduate Programmes in Mathematical Studies Level HE2 Modular Examination

Module CS250 Computer Technology

Duration: 2 hours

Autumn Semester 2007

Answer FIVE questions from Section A and TWO questions from Section B. Calculators are permitted. Aim to spend one hour on Section A and one hour on Section B. The maximum score for this examination is 100 marks, with 50 marks available from each section.

SEE NEXT PAGE


-2-

CS/250/5/AS07

Section A - answer FIVE questions from this section

A1.

(a) List the stages of processing that could be performed in a pipelined manner as an instruction stream is executed by a computer. (b) With the aid of a time-sequence diagram, show when accesses to memory can give rise to a structural hazard , and indicate how a processor designer might overcome this situation. [ 10 marks ]

A2. Show the effects of the following bitwise operators, when all the operands below are specified in decimal and the operations are performed using 8-bit words after conversion to binary in a 2’s complement representation: (a) 49 OR 5 (b) 56 AND 77 (c) 39 XOR 12 [exclusive OR] (d) -122 ASR 1 [arithmetic right-shift; -122 decimal = 10000110 binary] (e) 47 RR 3 [rotate right]

[ 10 marks ]

A3. Show how a computer might use stack frames to keep track of locally-declared variables during its execution of nested subroutines. For one such subroutine, show how a typical sequence of machine instructions might manage the stack during the call and return phases of its operation. There is no need to provide detailed instructions, just indications of their behaviour. [ 10 marks ]

A4. Virtual Memory sometimes can perform extremely badly. Provide examples of programs that perform similar functions in different amounts of time, and explain the reason for the poor memory performance. [ 10 marks ]

A5. Write a program that is able to report whether it is running on a processor that adopts a big endian or a little endian memory layout. Explain the behaviour of your code. Discuss whether your program would provide the correct result when run on processors with different native word lengths. [ 10 marks ]

A6. A virtual memory system provides access to two types of memories of widely differing access times (i.e. DRAM and disc). Explain how this combined memory system operates, and why it is able to offer overall access times that are usually far nearer to those of the DRAM than to those of the disc. Provide numerical values to illustrate your answer. [ 10 marks ]

SEE NEXT PAGE


CS/250/5/AS07

-3-

A7. Inside a compiler, an expression has been converted to the following reverse Polish form: abc * d + +ef * g + * Provide a series of typical CISC instructions that the compiler could generate to evaluate this expression. The variables a to g will initially be stored in memory, and the result should also be stored to memory upon completion. State any assumptions that you make about this style of processor and its operand accesses. [ 10 marks ]

A8. Explain how load balancing issues relate to pipelined parallelism. In a pipelined processor, explain why increasing the number of pipeline stages will not cause the processor’s overall performance [i.e. its instruction throughput] to rise by the same ratio. [ 10 marks ]

SEE NEXT PAGE


-4-

CS/250/5/AS07

Section B - answer TWO questions from this section B1. Consider the concept of RAID, or Redundant Arrays of Independent Discs. (a) Explain the principles of RAID systems and list their benefits.

[ 3 marks ]

(b) In the context of a RAID system, define the following terms and show how they are used: (i)

Mirroring;

(ii) Striping (at the bit and block levels); (iii) Error Correcting Codes

[ 6 marks ]

(c) Describe RAID arrangements that can improve: (i)

performance;

(ii) availability; (iii) the ease of repair or recovery following a disc failure.

[ 12 marks ]

(d) Discuss circumstances when disc failures may not occur independently, and therefore why RAID systems do not solve all reliability issues. [ 4 marks ]

SEE NEXT PAGE


-5-

CS/250/5/AS07

Section B continued - answer TWO questions from this section

B2.

(a) In the context of a file system, define the following terms: (i)

Contiguous Allocation of disc blocks

(ii) Linked Allocation of disc blocks (iii) Indexed Allocation of disc blocks

[ 9 marks ]

(b) Describe, in detail and with a diagram, how the Unix i-node block allocation scheme operates. [ 8 marks ]

(c) How might the free space on a disc be identified?

[ 4 marks ]

(d) Explain the purpose of a filesystem consistency checker program, and list its main activities. [ 4 marks ]

B3.

(a) Outline three significant differences between a Complex Instruction Set (CISC) processor (e.g. the Intel Pentium) and a Reduced Instruction Set (RISC) processor (e.g. the Sun SPARC). [ 6 marks ]

(b) Indicate how a RISC processor accesses operands that are stored in memory; which common addressing modes are applicable to this type of processor and which cannot be accommodated by the instruction format? [ 5 marks ]

(c) Consider the following Java program fragment: j = 0; for (i=2; i<6; i++) { j = j + (6 * i); } Show a possible sequence of assembly-language instructions that could be generated to implement this fragment on a typical zero-address (e.g. JVM) processor. State any assumptions that you make. Provide a trace to show how your program executes.

[ 14 marks ]

Internal Examiners:

Dr. R.M.A. Peel

External Examiner:

Prof. P.D. Picton

SEE NEXT PAGE


Turn static files into dynamic content formats.

Create a flipbook
Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.