Final Sample Questions Fall 2015
Final Sample Questions Fall 2015
Final Sample Questions Fall 2015
Address:
Rr. Kodra e Diellit, Selit
Tirana, Albania
UNIVERSITY OF NEW YORK, TIRANA
Is the 4-bit control input for the ALU completely determined by the opcode field of (a)
memory-access instructions, (b) branch instructions, (c) R-type instructions? In the
case(s) when this field is not adequate, which other field is also used?
What is the role of the RegDst control signal, which datapath element does it control, and
what is its effect when asserted and when deasserted?
Is the PCSrc control signal completely determined from the opcode field of the
instruction? Why or why not?
The main control block in the CPU is fully determined by a truth table with six inputs and
nine outputs. Where do the input bits come from?
If there are five stages in a pipelined processor, what is the ideal increase in throughput?
Is there an improvement in the execution time of a single instruction? Discuss why
throughput is more significant than the execution time of single instructions.
What are structural hazards? Explain why in MIPS structural hazards are avoided by
using two separate memories for instructions and data.
What is a data hazard? Illustrate with an example from MIPS.
Does forwarding (bypassing) completely eliminate stalls in the pipeline? Explain with an
example.
Consider the following figure, comparing nonpipelined versus pipelined execution of
three instructions. Give at least two reasons why we do not get the expected five-fold
increase in throughput from the five stages, but 2400 ps versus 1400 ps.
Address:
Rr. Kodra e Diellit, Selit
Tirana, Albania
UNIVERSITY OF NEW YORK, TIRANA
Address:
Rr. Kodra e Diellit, Selit
Tirana, Albania
UNIVERSITY OF NEW YORK, TIRANA
Suppose we add a L2 cache between the L1 cache and the main memory. How does it
affect (if it does) the following?
o Hit rate in the L1 cache
o Miss penalty in the L1 cache
o Overall performance of the memory hierarchy
Give at least two reasons for implementing virtual memory in computer systems.
What is the role of the page table in virtual memory systems?
What is the process of translating a virtual address generated by the CPU to a physical
address?
Assume a computer system contains 1 GB of physical memory and a page size of 4 KB.
What is the number of physical pages? If 32-bit virtual addresses are used, what is the
number of virtual pages and what is the increase in memory available to programs?
What is the role of the Translation Lookaside Buffer (TLB)?
Address:
Rr. Kodra e Diellit, Selit
Tirana, Albania
UNIVERSITY OF NEW YORK, TIRANA
Which of the following cases of parallelism require extra effort from application
programmers:
o Job-level parallelism
o Instruction-level parallelism
o Parallel processing program
80% of a program running in a quad-core CPU can be parallelized. What is the maximum
speed-up? What would be the maximum speed-up if the number of cores approached
infinity?
Give at least two reasons why the maximum speedup predicted by Amdahls law could
not be achieved.
Suppose you want to perform two sums: one is a sum of 5 scalar variables, and one is a
matrix sum of a pair of two-dimensional arrays, with dimensions 50 by 50. What speedup do you get with 4, versus 10, versus 100 processors?
If there are three parallel threads, A, B and C, running the following code in a SMP
computer:
x = x + 5;
System.out.println(x);
what are their possible interleaving scenarios and what are the possible outputs, if x is
initially 0? Which should be the correct value?
Which are some of the drawbacks of clusters over SMPs?
Describe grid computing.
Explain why.
Address:
Rr. Kodra e Diellit, Selit
Tirana, Albania
UNIVERSITY OF NEW YORK, TIRANA
Draw the block diagram and the truth table for a 2-bit input decoder.
Implement the above sum-of-products function for D with a programmable logic array in
a diagram.
Explain why do we consider a ROM as a combinational circuit?
Draw the truth table and write the sum-of-products equation for an adder hardware for the
CarryOut signal, with inputs being two bits (a and b) and a CarryIn signal.
What is edge-triggered clocking?
How can we convert the following S-R latch:
into a D latch controlled by a single data (D) bit (rather than two S-R bits) and a clock
signal that is either asserted or not?
Address:
Rr. Kodra e Diellit, Selit
Tirana, Albania