CS286 Computer Organization & Architecture
Possible Quiz Questions (Quiz #6)
For October 4th, 2017
The following is a list of possible questions for our quiz on October 4th. Some of the questions will not be asked in the quiz. All the questions that will appear in the quiz will appear exactly as shown below (however, numeric parameters may be changed). The quiz is closed textbook, closed notes and closed neighbors. Note that the questions, which did not appear in this quiz, still may appear in the exams. You will find a solution for these questions during lectures.
Part I – the “leftover topics” from the previous weeks:
#1: What is “Moore’s Law”?
#2: What is “Von-Neumann Architecture”?
#3: What is “Overflow Flag” in a processor (how is it used) for handling operations on two’s complement integers?
Part II – the new topics from 9/29:
#4: What are the four different types of data hazards?
#5: Show an example of RAR data hazards.
#6: Show an example of RAW data hazards.
#7: Show an example of WAR data hazards.
#8: Show an example of WAW data hazards.
#9: Assume that all the inputs for each instruction must be available by the beginning of the ID phase and the output from each instruction becomes available at the end of the WB phase, find which of the following four datapath architectures can data hazards for each of RAR, RAW, WAR, and WAW?
#10: Which instruction is used to call a subroutine?
#11: What are the two tasks “jal” instruction performs?
#12: Describe what “jr $ra” instruction performs.
#13: The following is a sketch of subroutine calls using jal and jr instructions. What is the problem in the program?
#14: What is “recursive subroutine call”?
#15: What is the “terminating condition” that should be used in recursive structure? Why do we need one in most of the recursive structures we implement?
#16: In order to solve the problem talked about in #3, what should we do? Show what are supposed to be done in the subroutine.
#17: Describe exactly what will happen if we do not save and restores $ra register as shown below:
#18: As we discussed in the classroom, we need to save registers even in “main” (as shown below) if any recursive subroutine call is performed within “main”. Explain why we need to do so.
#19: What is the purpose of “SP” register?
#20: When a recursive subroutine is called, how can it reserve its own “stack frame” (show how)?
#21: If your recursive sub-routine module modifies 8 GPR’s (and $ra and $fp), how large should its stack frame be (how many bytes) for MIPS R3000 processor?
#22: In the recursive function call shown in the following figure, whose “$ra” is this?
______
CS 286 – Computer Organization & Architecture, Quiz #6, Question List