You are on page 1of 1

COMSATS University Islamabad (Wah Campus)

Department of Computer Sciences

Program/Class: BCS 4A & MCS 3 Date: April 1, 2021


Subject: Computer Architecture Instructor: Fasih ur Rehman
Total Time Allowed: 60 mins Maximum Marks: 10

Note: Read the instructions carefully and follow them in letter and spirit

1. The Exam is open book and open notes


2. No Discussion is allowed any type of similarity shall be dealt strictly.
3. Preferably, use A4 broad line assignment sheets or A4 plane Sheets
4. Every page MUST be numbered and have your name and registration number.
5. Use black pen and write clearly, leaving ample space between the words.
6. Draw clear pictures with proper labels. Use rulers
7. Use flatbed / desktop scanner or CamScanner or SimpleScanner mobile App to snap the
exam. Use multiple page doc scanning option and save the document in black & white in
PDF.
8. Upload (PDF files only) on cuonline within stipulated time.
9. Make sure that you upload appropriate file on CUONLINE

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)

You might also like