CS代考 CS 213 Fall 2005

Final Exam Solutions
CS 213 Fall 2005

A. 30 VA bits

Copyright By PowCoder代写 加微信 powcoder

B. 28 PA bits
C. 2^(30-12) = 2^18 page table entries

Format A Format B
bits val bits val

0 10110 011 176 0 1110 0110 176
1 00111 010 -5/1024 1 0000 0101 -5/1024 (Norm -> Denorm)
1 11100 000 -8192 1 1110 1111 -248 (smallest number > -Inf)
0 10111 100 384 0 1111 0000 +Inf

int foo (unsigned int x)
int a, b, i;

if(x < 2) // or x <=1 for(i = 2; i <= x; i++) a = a + b; b = a - b; A. CPE = 5.0/1 = 5 B. CPE = 5.0/2 = 2.5 C. Unroll by 10 to get optimal CPE of 0.5 D. Some possible reasons: i-cache capacity misses, not enough registers, long finishing code, matrix workload not large enough (a) CT:[13-6], CI:[5-4], CO:[3-0] (b) CI=0x2, CO=0xc (12) (c) The key is to notice that arr[0][0] has a block offset of 12, and thus it occupies the last 4 bytes of its associated cache block and arr[0][1] starts a new cache block. arr[1][2] M arr[0][0] H arr[4][0] H arr[0][3] M A. Number of output lines = 2^n B. Possible output sequences: C. Output: counter = 2 counter = -2 counter = 4 A. correct: A, C, E, F B. correct: A A. cnt == 2 B. cnt == 1 C. cnt == 2 D. cnt == 1 ********** Problem 10 ********** No additional semaphores needed [Read operation: peek at front item] 程序代写 CS代考 加微信: powcoder QQ: 1823890830 Email: powcoder@163.com