代写代考 15-213, Fall 2007

15-213, Fall 2007
Final Exam Solutions

Copyright By PowCoder代写 加微信 powcoder

A(a): 0 110 1111 (largest finite positive value)

A(b): X_A < X_B (since X_B can store larger exponents) B(a): 1 0000 001 (smallest denormalized value with a negative sign bit) B(b): Y_A < Y_B (since format B can represent values closer to 0, and both are negative). 1 011 1010 -13/8 1 0111 101 -13/8 0 101 0011 19/4* 0 1001 010* 5* 1 000 1100 -3/16* 1 0100 100* -3/16* 0 110 1000* 12 0 1010 100* 12 0 100 1010* 13/4 0 1000 101* 13/4 * = filled-in blank Address: 0x8BEEFCDC Address: 0x024C8320 Address: 0x00100008 Fault: Yes Reason: Write bit not set in the data field Address: 0x01000478 The following 3 are legal: (semaphores are interchangable) s1 = 3, s2 = 2, s3 = 1, s4 = 1 thread1() thread2() thread3() { { { while (x!=360){ while (x!=360){ while (x!=360){ P(s1); P(s2); P(s3); P(s4); P(s4); P(s4); x = x * 2; x = x * 3; x = x * 5; V(s4); V(s4); V(s4); } } } exit(0); exit(0); exit(0); } } } Note: using s4 as lock and s1-s3 as iterators (and block all but the last (b) between 0 and N 程序代写 CS代考 加微信: powcoder QQ: 1823890830 Email: powcoder@163.com