Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
DEPARTMENT OF ECE
CS6303 COMPUTER ARCHITECTURE (6th semester)
16 MARKS QUESTION BANK
Code Sequence
1
2
For a particular high-level language statement, the compiler writer is considering two code
sequences that require the following instruction counts:
a) Which code sequence executes the most instructions?
b) Which will be faster?
c) What is the CPI for each sequence? (Dec 2014)
11. A program runs in 12 seconds on computer A, which has a 3 GHz clock. We have to design
a computer B such that it can run the same program within 9 seconds. Determine the clock
rate for computer B. Assume that due to increase in clock rate, CPU design of computer B
is affected ant it requires 1.2 times as many clock cycles as computer A for execution this
program. (8marks)
12. Assume a two address format specified as source, destination. Examine the following
sequence of instructions and explain the addressing modes used and the operation done in
every instruction. (Dec 2014) (10 marks)
1)Move (R5)+, R0
2)Add (R5)+, R0
3)Move R0, (R5)
4)Move 16(R5),R3
5)Add #40,R5
13. Register R1 and R2 of a computer contain the decimal values 1200 and 2400 respectively.
What is the effective address of the memory operand in each of the following instructions?
1)Load 20(R1), R5 2) Add (R2), R5 3)Move #3000, R5 4)sub (R1)+, R5.
14. Consider three different processors p1,p2,p3 executing same instruction set.P1 has a
3Ghz clock rate and a CPI of 1.5 . P2 has a 2.5 Ghz clock rate and a CPI of 1.0 .P3 has a
4.0 Ghz clock rate and has a CPI of 2.2. (10 marks)
(i) Which processors has the highest performance expressed in instruction per second?
CPU time=Instruction count* CPI / Clock rate
CPU time P1=Instruction count* CPI / Clock rate =n*1.5/3*109 =n*0.5 *10-9 sec
CPU time P2=Instruction count* CPI / Clock rate = n*0.4*10 -9 sec
CPU time P3=Instruction count* CPI / Clock rate = n*0.55 * 10-9 sec
Therefore p2 produces highest performance than other processors.
(ii) If the processor each execute a program in 10 seconds,find the number of cycles and
the number of instructions.
Number of clock cycles:
CPU time for p1,p2,p3=10 sec
CPU time= CPU clock cycles / clock rate
CPU clock cycles = CPU time * clock rate
CPU clock cycles P1 = 10 sec * 3 * 109 Hz =30*109 cycles
CPU clock cycles P2 = 10 sec * 2.5 * 109 Hz =25*109 cycles
CPU clock cycles P3 = 10 sec * 4 * 109 Hz = 40*109 cycles
Number of instructions count:
CPU clock cycles = Instruction count* CPI
Instruction count = CPU clock cycles / CPI
Instruction count P1=CPU clock cycles / CPI = 30*10 9 cycles / 1.5 =20 *109 instructions
Instruction count P2 = CPU clock cycles / CPI = 25*10 9 cycles / 1.0 =25 *109 instructions
Instruction count P3= CPU clock cycles / CPI = 40*109 cycles / 2.2 =18.18 *109 instructions
6. Explain Floating Point operations (floating point addition, floating point subtraction,
floating point multiplication and floating point division-steps, flowchart with example
problems) in detail. (Theory or problem) (16marks)
(Single and double precision problems)
7. Represent 1259.12510 in Single and double precision format.
8. Represent -307.187510 in Single and double precision format
9. Explain floating point addition and subtraction in detail. (16marks)
or
Perform floating point addition using the numbers 0.510 and 0.437510 use the floating
point addition algorithm.
Perform floating point multiplication using the numbers 0.510 and 0.437510 use the
floating point addition algorithm.
UNIT IV PARALLELISM
1. Explain Instruction-level-parallelism or Static & Dynamic multi-issue processors or
different ways of implementing a multi-issue processors (8/16marks) (text book + xerox)
2. Explain the dynamic multi-issue processors or limitations of ILP.(8marks) (text book +
xerox)
3. Explain dynamic pipeline scheduling.( xerox)
4. Explain Parallel processing challenges with problems (8marks) (text book + xerox)
5. Explain Flynn's classification (SISD, SIMP, MISD, MIMD, SPMD(single program multiple data
stream),MPMD, VECTOR and SCALAR systems) (8/16marks) (text book + xerox)
Single program, multiple data streams (SPMD)
Multiple autonomous processors simultaneously executing the same program (but at independent
points, rather than in the lockstep that SIMD imposes) on different data. Also termed single process, multiple
data - the use of this terminology for SPMD is technically incorrect, as SPMD is a parallel execution model
and assumes multiple cooperating processes executing a program. SPMD is the most common style of
parallel programming. The SPMD model and the term was proposed by Frederica Darema. Gregory F. Pfister
was a manager of the RP3 project, and Darema was part of the RP3 team.
Multiple programs, multiple data streams (MPMD)
Multiple autonomous processors simultaneously operating at least 2 independent programs.
Typically such systems pick one node to be the "host" ("the explicit host/node programming model") or
"manager" (the "Manager/Worker" strategy), which runs one program that farms out data to all the other
nodes which all run a second program. Those other nodes then return their results directly to the manager. An
example of this would be the Sony PlayStation 3 game console, with its SPU/PPU processor .