Computer Architecture Question - Bank
Computer Architecture Question - Bank
2. What will be the speed up for a 4-segment linear pipeline when the number of instruction n=64?
(a) 4.5 (b) 3.82 (c) 8.16 (d) 2.95
9. MIPS means
(a) Multiple Instructions per Second (b) Millions of Instruction per Second
(c) Multi-Instruction Performed System (d) None of these.
15. The time to access shared memory is same in which of the following shared memory multiprocessor
models?
(a) NUMA (b) UMA (c) COMA (d) ccNUMA.
17. In absence of TLB, to access a physical memory location in a paged-memory system how many
memory accesses are required?
(a) 1 (b) 2 (c) 3 (d) 4
18. A direct mapped cache memory with n blocks is nothing but which of the following set associative
cache memory organizations?
(a) 0-way set associative (b) 1-way set associative
(c) 2-way set associative (d) n-way set associative
20. Which of the following is not the cause of possible data hazard?
(a) RAR (b) RAW (c) WAR (d) WAW.
21. Assume a system where main memory is of size 16 K X 12 and cache memory is of size IK X 12. For a
direct mapping system which statement is correct?
(a) Tag field is 9 bits and index field are 6 bits
(b) Tag field is 4 bits and index field are 10 bits
(c) Tag field is 7 bits and index field are 8 bits
(d) None of these.
26. In general, an n input Omega network requires ______ stages of 2x2 switches.
(a) 2 (b) 4 (c) 8 (d) 16.
30. The main memory of a computer has 2 cm blocks while the cache has 2 c blocks. If the cache uses the
set associative mapping scheme with 2 blocks per set; then block k of the main memory maps to the set
(a) (k mod m) of the cache (b) (k mod c of the cache
(c) (k mod 2c of the cache (d) (k mod 2 cm) of the cache.
31. Overlapped register windows are used to speed up procedure call and return in
(a) RISC architecture (b) CISC architecture
(c) Both (a) and (b) (d) None of these.
39. The seek time of a disk is 50ms. It rotates at the rate of 30 rotations/ second. The capacity of each track
is 300 words. The access time is approximately
(a) 62 ns (b) 60 ns (c) 47 ns (d) none of these.
41. Consider the cache memory with access time 40 ns has the hit ratio of 80%. The regular memory has an
access time of 100 ns. What is the effective access time for CPU to access memory?
(a) 52 ns (b) 60 ns (c) 70 ns (d) 80 ns.
42. What is a main advantage of classical vector systems (VS) compared to RISC based systems (RS)?
(a) VS have significantly higher memory bandwidth than RS
(b) VS have higher clock rate than RS
(c) VS are more parallel than RS
(d) None of these.
45. How many address bits are required for a 512 x 4 memory?
(a) 512 (b) 4 (c) 9 (d)
46. The division of stages of a pipeline into sub-stages is the basis for -
(a) pipelining (b) super-pipelining (c) superscalar (d) VLIW processor
47. The seek time of a disk is 30ms. It rotates at the rate of 30 rotations/second. The capacity of each track
is 300 words. The access time is approximately
(a) 62ms (b) 60ms (c) 47ms (d) none of these
52. Which of the following types of instructions are useful in handling sparse vectors or sparse matrices
often encountered in practical vector processing applications?
(a)Vector-Scalar instruction (b)Masking instruction
(c)Vector-memory instructions (d)None of these.
55. Assuming a Main memory of size 32 K x 12, Cache memory of size 512 x 12 and block size of 1 word,
the addressing relationships using direct mapping would be
(a) tag field-6 bits, index field-9 bits (b) tag field-9 bits, index field-6 bits
(c) tag field-7 bits, index field-8 bits (d) none of these.
56. Overlapped register windows are used to speed-up procedure call and return in
(a) RISC architectures (b) CISC architectures
(c) both (a) and (b) (d) none of these.
57. For 2 Instructions I and J, RAW hazard occurs if
(a) R(I) ∩ D(J) ≠ φ (b) R(I) ∩ R(J) ≠ φ
(c) D(I) ∩ R(J) ≠ φ (d) none of these.
59. Performance (P) and execution time (T) of CPU are related by
(a) P ∞ T (b) P ∞ 1/T (c) P = T (d) none of these.
(a) (b)
72. Consider a 4-segment pipeline with stage delays (2 ns, 8 ns, 3 ns, 10 ns). Find the time taken to execute
100 tasks in the above pipeline
(a) 910 ns (b) 1000 ns (c) 1030 ns (d) 1140 ns
[PART-B]
Module 1 (Introduction)
1. Describe the function of Major Components of a digital computer with neat sketch
2. What are the different parameters used in measuring CPU performance? Briefly discuss each.
Module 2 (Pipelining)
1. Identify the hazards in the following instruction stream.
l1 : r2← r2+r3
l2 : if r2=0 then goto L3
l3 : M[500] ←R2
l4 : L3: M[600] ←M[500] +r5
6. What is the difference between static pipeline and dynamic pipeline? Write how data dependency
hazard is solved.
8. What do you mean by hazard in pipeline? Describe different type of hazard. How data-dependency is
detected. What is effect of branch instruction in pipelining? Find out effective throughput due to branch
instruction. Write how branch hazard is handled.
1 2 3 4
S1 X X
S2 X
S3 X
S4 X X
10. Distinguish static pipeline from a dynamic pipeline. Define speed-up. Deduce that the maximum speed-
up in a k-stage pipeline processor is k. Is this maximum speed-up always achievable? Explain.
11. Suppose the time delays of the 4 stages of a pipeline are t1=60ns, t2=50ns, t3=90 ns and t4=80ns
respectively and the interface latch has a delay t1=10 ns, then
i)What would be the maximum clock frequency of the above pipeline?
ii) What is the maximum speed-up of this pipeline over that of its non-pipeline counterpart?
4. Explain the memory hierarchy pyramid, showing both primary and secondary memory in the diagram
and explain the relationship of cost, speed and capacity.
7. What is cache mapping? Explain direct mapping for 256 x 8 RAM and 64 x 8 cache.
8. Draw the block diagram for an associative memory cell and explain it.
9. Suppose a computer using direct mapped cache has 220 words of main memory and a cache of 32
blocks, where each cache block contains 16 words.
(a) How many blocks of main memory are there?
(b) What is the format of a memory address as seen by the cache, that is, what are the sizes of the tag,
block, and word fields?
(c) To which cache block will the memory reference 0DB6316 map?
10. Explain the concept of locality of reference and state its importance to memory systems.
11. What do you mean by m-way interleaving? In the system with pipeline processing, is the memory
interleaving useful? If yes, explain why.
12. Draw the block diagram of C-access memory function. Why is it necessary and how does it improve the
memory access time?
13. How do you speed up memory access in case of vector processing? With architecture and timing
diagram explain S-access memory organization
14. a. What is cache mapping? Explain cache mapping for 256 x 8 RAM and 64 x 8 cache.
b. Explain how a RAM of capacity 2 Kbytes can be mapped into the address space (1000)H to (17FF)H
of a CPU having a 16 bit address lines. Show how the address lines are decoded to generate the chip-
select condition for the RAM.
17. a. What is cache memory? How does it increase the performance of a computer? What is hit ratio?
b. A three-level memory system having cache access time of 5 nsec and memory access time of 40 nsec,
has a cache hit ratio of 0.96 and main memory hit ratio of 0.9. What should be the disk access time to
achieve an overall access time of 16 nsec?
c. A hierarchical three-level memory system having cache access time of 10 nsec and memory access
time of 150 nsec, has a cache hit ratio of 0.97 and main memory hit ratio of 0.9. What should be the disk
access time to achieve an overall access time of 20 nsec?
18. a. What is Cache memory? Why is it needed? Explain the Write-through and Write –back mechanism.
b. Why is set-associative mapping technique more advantageous than direct or associative mapping
technique?
c. A computer has 512 KB cache memory and 2 MB main memory. If the block size is 64 bytes, then
find out the subfields for
i. direct mapping cache
ii. associative
iii. 8-way set associative cache
d. Why memory hierarchy is needed? What are the different levels in memory hierarchy?
19. a) What is cache memory? Explain different cache memory mapping techniques.
b) What is TLB? What is virtual memory? How virtual memory is implemented?
20. a) What are the differences between centralized shared memory architecture and distributed shared
memory architecture?
b) Write difference between direct mapped and set-associative caches with example
4. Design a parallel algorithm to perform matrix multiplication using 2D pipeline processor (systolic array
processor). What will be the time complexity if the size of each matrix is NxN.
5. What are the differences between shared memory multiprocessor system and message passing
multicomputer system? Draw 16x16 butterfly networks.
6. What do you mean by vector processor? What are the differences between memory-to-memory
architecture and register-to-register architecture? Describe different types of vector instructions. Give
the block diagram to indicate the architecture of a typical vector processor with multiple function pipes.
7. What is vector processor? How does it differ from SIMD machine? What are the different types of
vector operations? Give different fields in a vector instruction. Write the differences between scalar
processor and vector processor.
8. What are the differences static network and dynamic network? What do you mean by bisection width of
a network? Draw 8x8 Omega network and show how connection is established between a source node
and destination node.
9. What do you mean by multi-stage interconnection network? Draw 16×16 omega network and show the
path between source node2 and destination node 13.
[PART - C]
Module I (Introduction & Pipelining)
1. Consider an instruction pipeline with five stages without any branch prediction: Fetch Instruction (FI),
Decode Instruction (DI), Fetch Operand (FO), Execute Instruction (EI) and Write Operand (WO). The
stage delays for FI, DI, FO, EI and WO are 5 ns, 7 ns, 10 ns, 8 ns and 6 ns, respectively. There are
intermediate storage buffers after each stage and the delay of each buffer is 1 ns. A program consisting
of 12 instructions I1, I2, I3, …, I12 is executed in this pipelined processor. Instruction I4 is the only
branch instruction and its branch target is I9. If the branch is taken during the execution of this program,
what is the time (in ns) needed to complete the program? [4]
3. How static scheduling approach of instruction pipeline can improve performance system? You may give
an example. Can you increase performance of the system by introducing dynamic scheduling? Explain
your answer. [2+3]
5. A CPU has a five-stage pipeline and runs at 1 GHz frequency. Instruction fetch happens in the first
stage of the pipeline. A conditional branch instruction computes the target address and evaluates the
condition in the third stage of the pipeline. The processor stops fetching new instructions following a
conditional branch until the branch outcome is known. A program executes 109 instructions out of
which 20% are conditional branches. If each instruction takes one cycle to complete on average, what is
the total execution time of the program? [3]
6. A5 stage pipelined CPU has the following sequence of stages:
IF - Instruction fetch from instruction memory.
RD - Instruction decode and register read.
EX - Execute: ALU operation for data and address computation.
MA - Data memory access - for write access, the register read at RD state is used.
WB - Register write back.
Consider the following sequence of instructions:
I1 : LOAD R0, loc 1; // R0 ← M[ loc l ]
I2 : ADD R0, R0; // R0 ← R0 + R0
I3 : SUB R2, R2 R0; // R2 ← R2 - R0
Let each stage take one clock cycle.
What is the number of cock cycles taken to complete the above sequence of instructions starting from
the fetch of I1? [3]
7. A 4-stage pipeline has the stage delays as 150, 120, 160 and 140 nanoseconds respectively. Registers
that are used between the stages have a delay of 5 nanoseconds each. Assuming constant clocking rate
evaluate the total time taken to process 1000 data items on this pipeline. [3]
8. For a pipelined CPU with a single ALU, consider the following situations
i) The j + 1-st instruction uses the result of the j-th instruction as an operand
ii) The execution of a conditional jump instruction
iii) The j-th and j + 1-st instructions require the ALU at the same time
Which of the above can cause a hazard and why? [3]
10. Comparing the time T1 taken for a single instruction on a pipelined CPU with time T2 taken on a non-
pipelined but identical CPU, we can say that (Give explanation)
(a) T1 = T2
(b) T1 > T2
(c) T1 < T2
(d) T1 is T2 plus the time taken for one instruction fetch cycle [3]
11. An instruction pipeline consists of 4 stages – Fetch (F), Decode field (D). Execute (E) and Result Write
(W). The 5 instructions in a certain instruction sequence need these stages for the different number of
clock cycles as shown by the table below.
Instruction F D E W
1 1 2 1 1
2 1 2 2 1
3 2 1 3 2
4 1 3 2 1
5 1 2 1 2
Find the number of clock cycles needed to perform the 5 instructions. [3]
12. A 40 MHz processor was supposed to execute 200000 instructions with following instruction mix and
CPI needed for each instruction
Instruction type CPI Instruction count
Integer arithmetic 2 60%
Determine the effective CPI, MIPS rate and execution time. [3]
13. What is branch target buffer (BTB) ? Why is it used in pipelining? [4]
1 2 3 4 5 6
S1 X X
S2 X X
S3 X
S4 X
S5 X X
2. Consider a 4-way set associative cache (initially empty) with total 16 cache blocks. The main memory
consists of 256 blocks and the request for memory blocks is in the following order:
0, 255, 1, 4, 3, 8, 133, 159, 216, 129, 63, 8, 48, 32, 73, 92, 155.
Which memory block among 3, 8, 129 and 216 will NOT be in cache if LRU replacement policy is
Used? [3]
3. A CPU generates 32-bit virtual addresses. The page size is 4 KB. The processor has a translation look-
aside buffer (TLB) which can hold a total of 128-page table entries and is 4-way set associative. The
minimum size of the TLB tag is: (Give explanation)
(A) 11 bits (B) 13 bits (C) 15 bits (D) 20 bits [3]
4. Why is C-access memory organization necessary and how does it improve the memory access time?
[3]
5. In the system with pipeline processing, is the memory interleaving useful? If yes, explain.
[2]
6. What is memory bandwidth? Can interleaved memory increase memory bandwidth? If yes, how?
[1+3]
7. What is the 90-10 rule and its relationship to the locality of references? [1+2]
Prepared By