EECS 370 Fall 2003 Final Exam solutions 1. A 2. A 3. A 4. FALSE 5. 4096 bits 6A. 524,288 bytes 6B. 526,336 bytes 7A. 46 milliseconds 7B. 1 millisecond 8A. 39 seconds 8B. 50 seconds 9A. C 9B. C 9C. E 10. Virtual page number: 0x01F Physical Address: 0xBAD Page offset: 0XAD Cache block offset: 0x1 TLB index: 3 Cache index: 0x3 TLB tag: 7 Cache tag: 0x5D TLB hit: No Page Fault: No Cache byte returned: 0x08 11A. FALSE 11B. FALSE 11C. TRUE 11D. FALSE 11E. FALSE 11F. TRUE 11G. C 12A. 6 bits 12B. 9 bits 12C. 25 bits 12D. 6 bits 12E. 9 bits 12F. 25 bits 12G. 4097 pages 12H. 5 pages 12I. 129 pages 12J. 455 picoseconds 12K. 0xBEAD0000 13. Add to the first section: addi $sp, $sp, -8 # decrement stack pointer sw $ra, 0($sp) # store return address sw $a0, 4($sp) # store a0 (m) Add to the second section: addi $a0, $a0, -1 # a0 = m - 1 mov $a1, $v0 # a1 = return value of A(m, n-1) Add to the third section: lw $ra, 0($sp) # restore return address lw $a0, 4($sp) # restore m addi $sp, $sp, 8 # increment stack pointer jr $ra # return from the function