Professional Documents
Culture Documents
Comsats Computer Architecture
Comsats Computer Architecture
Note: Read the instructions carefully and follow them in letter and spirit
Problem 1: Consider a program containing ‘j’ instructions of which ‘k’ instructions are loop
instructions. The program is executed on a system that contains cache. Instruction fetch from memory
costs ‘l’ nano-second while that for cache costs ‘m’ nano-second. If loop is executed ‘n’ times and
every other instruction is executed once only,
a) derive an expression for the speedup due to use of cache (ratio of the program execution time
without cache to the program execution time with cache). Assume, cache is empty initially
and is large enough to hold the loop completely and all the data required by the program is
hard-coded in the program. (3)
b) If j = 1500, k = (your registration number), l = 20 nano-seconds , m = 2 nano-seconds, and n =
100 calculate the speedup using your expression derived in ‘a’ part. (2)
Problem 2: Describe steps taken by interrupting device and processor in case of an interrupt request.
(2)
Problem 3: Differentiate exception and interrupt and describe role of stack in each case.
(2)