Rank the following types of memories in terms of average mem…

Rank the following types of memories in terms of average memory access time:      Disk storage, Register, Main Memory, L1 Cache, L2 Cache        Fastest                                                                                                                                      Slowest 

Write a MIPS program that always checks the bit 0 of a memor…

Write a MIPS program that always checks the bit 0 of a memory data at address 0x0BF81234. If it is equal to one add nth  and (n+1)th elements of an array and store it to memory address 0x0BF85678 . Suppose $t0  contains the address of the 0th element of an array of 32-bit data and $t1 = n.  

In an attempt to improve cache performance, you try a new st…

In an attempt to improve cache performance, you try a new strategy. You think that because your L1 cache has a hit rate of 90%, you could improve the AMAT by randomly going straight to memory 10% of the time instead of first checking the L1 cache. Assuming the cache has a hit time of 5 cycles, and memory has an access time of 100 cycles, calculate the AMAT for this “improved” system.      Average Memory Access Time =                                                                               cycles  

Consider each of the following sets of instructions. Decide…

Consider each of the following sets of instructions. Decide the minimum number of stalls needed in each case with and without forwarding. Assume the five stage MIPS pipeline discussed in class and that equality for branches are checked at the Decode stage. Assume delayed branching.  Number of stalls required?   Without forwarding With forwarding addiu $t1, $t0, 5 addu $t4, $t3, $t1 addu $t0, $t3, $t0     lw $t0, 4($s0) addu $t1, $t2, $t3 beq t0, t1, Done addu $t5, $t5, $s5       lw t1, 0($s0) sw t1, 0($s1)     addu $t0, $s0, $t1 lw $t1 8($t0)    

Assume we are using a simple model for floating-point (the r…

Assume we are using a simple model for floating-point (the representation uses a 14-bit format, 5 bits for the exponent with a bias of 15, a normalized mantissa of 8 bits, and a single sign bit for the number):   1. Show how the computer would represent the numbers 100.0 and 0.25 using this floating-point format.   2. Show how the computer would add the two floating-point numbers in part 1 by changing one of the numbers so they are both expressed using the same power of 2.

Suppose we have just found yet another representation for fl…

Suppose we have just found yet another representation for floating point numbers. Using this representation, a 12-bit floating point number has 1 bit for the sign of the number, 4 bits for the exponent and 7 bits for the mantissa, which is normalized as in the Simple Model so that the first digit to the right of the radix points must be a 1.  Numbers in the exponent are in signed 2’s complement representation.  No bias is used and there are no implied bits.  Show the representation for the smallest positive number this machine can represent using the following format.  What decimal number does this equate to?              

If the floating-point number representation on a certain sys…

If the floating-point number representation on a certain system has a sign bit, a 3-bit exponent and a 4-bit significand: What is the largest positive and the smallest positive number that can be stored on this system if the storage is normalized? (Assume no bits are implied, there is no biasing, exponents use two’s complement notation, and exponents of all zeros and all ones are allowed.)         What bias should be used in the exponent if we prefer all exponents to be non-negative?    

A task runs alone on a CPU. The task starts by running for 5…

A task runs alone on a CPU. The task starts by running for 5 ms. The task then waits for 4 ms while the operating system runs some instructions to access disk. The CPU is then idle for 2 ms while waiting for data from disk. Finally, the task runs another 10 ms and completes. (2.5 points)   a. The elapsed time is ________________ ms.     b. The user CPU time is ________________ ms.     c. The CPU time is _____________ ms.     d. The system performance is _______________ ms.     e. The CPU performance is ______________ ms.