In: Computer Science
5. On a machine, an instruction is always 16 bits long, and there are 16 registers. There are only two types of instruction supported:
If we want to make sure the machine can support 64 different monadic instructions, then how many dyadic instructions can it support at most? (10%)
--------------------------------
6. Let us assume we have such a machine. The physical RAM has 32 bytes, and is evenly divided into 4 pages. The virtual memory has 16 pages.
Physical RAM
|
Page table
|
The content in the page table and physical RAM is shown below:
Let us assume in a page, the offset of the left most byte is 0, and the offset of the right most byte is 7. If we are going to access the following virtual memory addresses, what is the data we will see? (10%)
0101 001
0011 000
1100 110
1001 011
--------------------------------
7.
Mem-block # 7, 1031, 2055, 4103, 1031, 7, 2055, 3079, 1031, 3079
What is the cache hit/miss rate if the cache is 4-way associative? Put “Hit” or “Miss” in the blanks in the table below. (5%)
7 |
1031 |
2055 |
4103 |
1031 |
7 |
2055 |
3079 |
1031 |
3079 |
7 |
1031 |
2055 |
4103 |
1031 |
7 |
2055 |
3079 |
1031 |
3079 |
As per the guidelines, among multiple questions the first needs to be answered.
Therefore, the answer of the first question 5 is provided below:
5.
Solution: