Anda di halaman 1dari 12

APRIL 2010

PART A (70 MARKS)

QUESTION 1
a) Describe any TWO (2) advantages of the von Neumann's architecture in modern computers. (4 marks)

The advantage of von Neumann’s store program concept is stored program concept
 Memory is addressed linearly
 Memory is addressed without regard to content

b) Define the main components of a computer system. (8 marks)

 Data = information
o Is stored where (hardware)
o Is manipulated by whom (software)
o Examples (resume, list of contacts, employees, documents, graphics, sound, …)

 Hardware
o I/O devices:
 Monitor, keyboard, mouse, speakers
 Storage: floppy disks, zip drives, hard disks, CDs

o The box
 CPU (one or more); CPU =
 Arithmetic and Logic Unit
 Control Unit
 Interfaces
 Memory (RAM)
 I/O interfaces
 Buses

 Software
o Software = computer programs
o Program = set of instructions defining
 Data to be manipulated
 Logic for manipulating it
o Types
 System software (operating systems)
 Application software

sk3let0nz © 2011
 Communication component
o Communication
o Computer communicate with each other
o Networks
o Required components:
 Hardware
 Software
o Computers can communicate with each other, independently of their size
o The field where most of the future action will take place

c) In 1946, Flynn introduced the most common way for categorizing systems with parallel processing
capability. Define the FOUR (4) categories of the computer systems. (12 marks)

1. Single instruction stream, single data stream (SISD)—This category is the uniprocessor.
 Single processor
 Single instruction stream
 Data stored in single memory

2. Single instruction stream, multiple data streams (SIMD)—the same instruction is executed by
multiple processors using different data streams.
 Single machine instruction
 Controls simultaneous execution
 Number of processing elements
 Lockstep basis
 Each processing element has associated data memory
 Each instruction executed on different set of data by different processors
 Vector and array processors

3. Multiple instruction streams, single data stream (MISD)—No commercial multiprocessor of this
type has been built to date.
 Sequence of data
 Transmitted to set of processors
 Each processor executes different instruction sequence
 Never been implemented

4. Multiple instruction streams, multiple data streams (MIMD)—Each processor fetches its own
instructions and operates on its own data.
 Set of processors
 Simultaneously execute different instruction sequences
 Different sets of data
 SMPs, clusters and NUMA systems

sk3let0nz © 2011
QUESTION 2

a) Explain the TWO (2) main problems in complex instruction set computers (CISC) that reduces the CPU
processing power. (6 marks)

 Earlier generations of a processor family generally were contained as a subset in every new
version
- So instruction set & chip hardware become more complex with each generation of
computers.

 Many instructions as possible could be stored in memory with the least possible wasted space,
individual instructions could be of almost any length
- This means that different instructions will take different amounts of clock time to
execute, slowing down the overall performance of the machine.

b) Briefly describe the FOUR (4) features of Reduced Instruction Set Computers (RISC). (8 marks)

 Examples : Power PC, Sun Sparc, Motorola 68000


 Limited and simple instruction set
 Fixed length, fixed format instruction words
 Enable pipelining, parallel fetches and executions
 Limited addressing modes
 Reduce complicated hardware
 Register-oriented instruction set
 Reduce memory accesses
 Large bank of registers
 Reduce memory accesses
 Efficient procedure calls

sk3let0nz © 2011
QUESTION 3

a) Each instruction must contain the information required by the processor for execution. Define the
Intel processor's instruction format. Draw appropriate diagram to support your answer. (4 marks)

 Layout of bits in an instruction


 Includes opcode
 Includes (implicit or explicit) operand(s)
 Usually more than one instruction format in an instruction set

Pentium Instruction Format

b) Define any FOUR (4) types of computer instructions. Give an example for each type. (8 marks)

sk3let0nz © 2011
 Data Transfer (load, store)
o Most common, greatest flexibility
o Involve memory and registers
o What’s a word ? 16? 32? 64 bits?

 Arithmetic
o Operators + - / * ^
o Integers and floating point
o
 Logical or Boolean
o Relational operators: > < =
o Boolean operators AND, OR, XOR, NOR, and NOT

 Single operand manipulation instructions


o Negating, decrementing, incrementing

 Bit manipulation instructions


o Flags to test for conditions

 Stack instructions
 Multiple data instructions
 Shift and rotate
 Program control
 Data processing – Arithmetic and logic instructions
 Data storage– Memory instructions
 Data movement – I/O Instruction
 Program flow control - Test and branch instructions

QUESTION 4

sk3let0nz © 2011
Pipelining is one of the major advances in modern computing design. Describe the use of pipeline in
scalar processors. Draw appropriate diagram to support your answer. (10 marks)

 Performance can be increased by separating the instruction cycle phase into separate
components and further separating it into independent execution unit with pipelining capability.
 With this the average instruction execution by the CPU can be approximately equals to the clock
speed of the machine.
 Assume each instruction requires 4 steps and each step takes 1 CPU time. With pipelining after
time = 4, each CPU clock thereafter can complete an instruction. Because of this for a 1000 CPU
clock cycle, 996 instructions can be completed. The average instruction execution per CPU clock
is 0.996 which approximately 1.
 When a processor fulfills this condition it is called a scalar processor.
Instruction 1 Step 1 Step 2 Step 3 Step 4
Instruction 2 Step 1 Step 2 Step 3 Step 4
Instruction 3 Step 1 Step 2 Step 3 Step 4
Instruction 4 Step 1 Step 2 Step 3 Step 4

Time (t)

QUESTION 5

sk3let0nz © 2011
a) A set of special registers are used by control unit to handle the fetch-execute cycle for each
instruction. Explain functions of the registers in an instruction's fetch-execute cycle. Draw
appropriate diagram to support your answer. (8 marks)

Once started, a computer continuously performs the


following

Special purpose registers used

o PC: Program Counter to hold address of next instruction to be fetched


o MBR: Memory Buffer Register for value to be read/written from/to memory
o IR: Instruction Register to contain opcode of the last Instruction

b) What is the benefit of implementing microcode in the control unit? (2 marks)


 Microcode are tiny programs stored in ROM that replace CPU instructions
 Advantages
o More flexible
o Easier to implement complex instructions
o Can emulate other CPUs
 Disadvantage
o Requires more clock cycles

sk3let0nz © 2011
PART B (30 MARKS)

Answer TWO (2) questions only.

QUESTION 1

a) List the THREE (3) common approaches to enhance the performance of computer memory. (3 marks)

 Access time
 Memory Cycle time
 Transfer rate

b) Describe any TWO (2) of the approaches that you have listed in (b) above. (6 marks)

 Access time
o Time between presenting the address and getting the valid data
o time taken for read/write operation

 Memory Cycle time


o Time may be required for the memory to “recover” before next access
o Cycle time is access + recovery
o related to system bus, to determine total time to complete an read/write operation

 Transfer rate
o the rate for data to be transferred into/out of memory unit
o Rate at which data can be moved

sk3let0nz © 2011
c) Explain on how shared memory multiprocessors can improve data processing speed. (6 marks)

 Several processors share one address space


o conceptually a shared memory
o often implemented just like a multicomputer
 address space distributed over private memories
 Communication is implicit
o read and write accesses to shared memory locations
 Synchronization
o via shared memory locations
 spin waiting for non-zero
o barriers

sk3let0nz © 2011
QUESTION 2

a) Write assembly instructions that implement the following construct: (9 marks)

I F P = 16i 0 THEN
X = 2io + 3io
ELSE
X=Y
ENDIF

b) Explain any TWO (2) benefits of symmetric multiprocessors (SMP). Provide an example to support
each answer. (6 marks)

 Performance
o If some work can be done in parallel

 Availability
o Since all processors can perform the same functions, failure of a single processor does
not halt the system

 Incremental growth
o User can enhance performance by adding additional processors

 Scaling
o Vendors can offer range of products based on number of processors

sk3let0nz © 2011
QUESTION 3

a) List any FOUR (4) addressing modes for instructions in Intel processors and give ONE (1) example of
valid instruction for each of the addressing mode. (8 marks)

Register mode
 The operand is in a register. The effective address is the register.
 Example instruction: mov eax, ecx
 Both operands use register mode. The contents of register ecx are copied to register eax.

Immediate mode
 The operand is in the instruction. The effective address is within the instruction.
 Example instruction: mov eax, 26
 The second operand uses immediate mode. Within the instruction is the operand. It is copied to
register eax.

Register direct mode


 The effective address is in a register.
 Example instruction: mov eax, [esp]
 The second operand uses register direct mode. The contents of register esp is the effective
address. The contents of memory at the effective address are copied into register eax.

Direct mode
 The effective address is in the instruction.
 Example instruction: mov eax, var_name
 The second operand uses direct mode. The instruction contains the effective address. The
contents of memory at the effective address are copied into register eax.

Base displacement mode


 The effective address is the sum of a constant and the contents of a register.
 Example instruction: mov eax, [esp + 4]
 The second operand uses base displacement mode. The instruction contains a constant. That
constant is added to the contents of register esp to form an effective address. The contents of
memory at the effective address are copied into register eax.

Base-indexed mode
 The effective address is the sum of the contents of two registers.
 Example instruction: mov eax, [esp][esi]
 The contents of registers esp and esi are added to form an effective address. The contents of
memory at the effective address are copied into register eax.

PC relative mode
 The effective address is the sum of the contents of the PC and a constant contained within the
instruction.
 Example instruction: jmp a_label
 The contents of the program counter are added to an offset that is within the machine code for
the instruction. The resulting sum is placed back into the program counter.

sk3let0nz © 2011
b) Write a program segment to load two integer values, subtract the second integer from the first
integer, and add the result to a third integer, as example:

OUT = (VAL1 - VAL2) + VAL3

You may use either the Little Man Computer (LMC) instructions or the assembly instructions. (7 marks)

sk3let0nz © 2011

Anda mungkin juga menyukai