Due: April 3
We would like to make all grading transparent and available as soon as possible. Because of this, we are requesting students to choose a secret username which will appear in grade sheets.
Submit your secret username via this Google Form. Please do not make it obvious to identify you. In the rare case of name conflicts, you will be notified to resubmit.
| Deliverable | Your secret username submitted via the webform. | Due: April 3 |
Due: April 3
Register your clicker on Ted.
| Deliverable | Successfully take the reading quiz on Thursday. | Due: April 3 |
| April 22 |
Due: April 17
Unless otherwise noted, the following problems are from the Patterson & Hennessy textbook (5th ed.).
| Deliverable | Place your typed (or well written) solutions to the problems in Andiry's campus mailbox (EBU3B, room 2237, labeled "Xu, Jian") before 9am. | Due: April 17 |
| May 5 |
Due: May 1
| GHz | Cost | Compiler A | Compiler B | |||
| Instructions | Average CPI | Instructions | Average CPI | |||
| rAlpha | 3.4 | $100 | 7000 | 1.2 | 5000 | 1.5 |
| c86 | 2.6 | $100 | 1500 | 2.2 | 1000 | 4.0 |
| GHz | Cost | Compiler A | Compiler B | |||
| Instructions | Average CPI | Instructions | Average CPI | |||
| rAlphaX | 3.4 | $170 | 2250/core | 1.5 | 1750/core | 1.8 |
| c86x4 | 2.6 | $170 | 625/core | 3.2 | 500/core | 5.0 |
rAlpha 20 W
c86 35 W
rAlphaX 50 W
c86x4 80 W
If you wanted to show that the first processor had the best power
efficiency for performance, what metric would you use? For this
part, use values only from Compiler A.The following table shows the execution time of five routines of a program running on 16 processors.
| # Processors | Routine A (ms) | Routine B (ms) | Routine C (ms) | Routine D (ms) | Routine E (ms) |
| 16 | 4 | 14 | 2 | 12 | 2 |
(1) Find the total execution time, and how much it is reduced if the time of routines A, C, & E is improved by 15%.
(2) By how much is the total time reduced if routine B is improved by 10%?
(3) By how much is the total time reduced if routine D is improved by 10%?
(4) Execution time in a multiprocessor system can be split into computing time for the routines plus routing time spent sending data from one processor to another. Consider the execution time and routing time given in the following table.
| # Processors | Routine A (ms) | Routine B (ms) | Routine C (ms) | Routine D (ms) | Routine E (ms) | Routing (ms) |
| 2 | 20 | 78 | 9 | 65 | 4 | 11 |
| 4 | 12 | 44 | 4 | 34 | 2 | 13 |
| 8 | 1 | 23 | 3 | 19 | 3 | 17 |
| 16 | 4 | 13 | 1 | 10 | 2 | 22 |
| 32 | 2 | 5 | 1 | 5 | 1 | 23 |
| 64 | 1 | 3 | 0.5 | 1 | 1 | 26 |
For each doubling of the number of processors, determine the ratio of new to old computing time and the ratio of new to old routing time.
| Deliverable | Place your typed (or well written) solutions to the problems in Qi's campus mailbox (2nd floor of the CSE building) before 9am. | Due: May 1 |
| May 5 |
Due: May 2
.text .globl main main: movl $0x0, %ebx movl $0x0, %ecx jmp check loop: mov %ecx, %eax add %eax, %ebx addl $0x1, %ecx check: cmpl $0x63, %ecx jle loop retNote: You can compile this code at home! Save it to foo.s and use gcc:
(01) lw $t0, 0($a0) (02) lw $t2, 8($a0) (03) lw $t1, 4($a0) (04) add $t6, $t0, $t1 (05) lw $t3, 12($a0) (06) sub $t7, $t1, $t2 (07) lw $t4, 16($a0) (08) lw $t5, 20($a0) (09) srlv $s2, $t6, $t7 (10) sub $s1, $t4, $t5 (11) add $s0, $t3, $t4 (12) sllv $s4, $t7, $s1 (13) srlv $s3, $t6, $s0 (14) sllv $s5, $s0, $s1 (15) add $s6, $s3, $s4 (16) add $s7, $s4, $s6 (17) srlv $t0, $s6, $s7 (18) srlv $t1, $t0, $s7a. When you run the tool with its settings targeted for a particular VLIW machine, you find that the resulting VLIW code has 9 VLIW instructions. What minimun value of N must the target VLIW machine have?
| MIPS Inst. No. | MIPS Inst. No. | MIPS Inst. No. | MIPS Inst. No. | MIPS Inst. No. | MIPS Inst. No. | MIPS Inst. No. | MIPS Inst. No. | MIPS Inst. No. | |
| VLIW Instruction 1: | |||||||||
| VLIW Instruction 2: | |||||||||
| VLIW Instruction 3: | |||||||||
| VLIW Instruction 4: | |||||||||
| VLIW Instruction 5: | |||||||||
| VLIW Instruction 6: | |||||||||
| VLIW Instruction 7: | |||||||||
| VLIW Instruction 8: | |||||||||
| VLIW Instruction 9: |
| Deliverable | Place your typed (or well written) solutions to the problems in Andiry's campus mailbox (EBU3B, room 2237, labeled "Xu, Jian") before 4pm. | Due: May 2 |
| May 14 |
Due: May 9
| I-Mem | Add | Mux | ALU | Regs | D-Mem | Control | |
|---|---|---|---|---|---|---|---|
| a. | 400ps | 100ps | 30ps | 140ps | 200ps | 350ps | 100ps |
| b. | 500ps | 150ps | 100ps | 180ps | 320ps | 1000ps | 65ps |
| Fetch | Decode | Execute | Memory | Writeback | |
|---|---|---|---|---|---|
| a. | 300ps | 400ps | 350ps | 550ps | 100ps |
| b. | 200ps | 150ps | 100ps | 190ps | 140ps |
50%: ALU
25%: BEQ
15%: LW
10%: SW
Assuming there are no stalls or hazards, what is the
utilization of the data memory? What is the utilization of the
register block's write port? (Utilization in percentage of
clock cycles used)
Sequence of instructions:
lw $s2, 0($s1)
lw $s1, 40($s3)
sub $s3, $s1, $s2
add $s3, $s2, $s2
or $s4, $s3, $zero
sw $s3, 50($s1)
| Deliverable | Place your typed (or well written) solutions to the problems in Qi's campus mailbox before 4 pm. | Due: May 9 |
| May 27 |
Due: May 27
Measuring branch prediction speedup: You'd like to add a branch predictor to your Baseline processor, and you're considering two options: PikaChooser and CharWizard. Evaluate the speedup of each relative to your Baseline if branches are 15% of all instructions. Assume normal CPI is 1, but the branch mispredict penalty is 2 extra stall cycles.
PikaChooser:Measuring branch predictor accuracy: This exercise examines the accuracy of various branch predictors for the following repeating patterns (e.g., in a loop) of branch outcomes. Accuracy is defined as the percentage of guesses that are correct. Answer each question (1-4) for each sequence (a-b):
| Deliverable | Place your typed (or well written) solutions to the problems in Andiry's campus mailbox (EBU3B, room 2237, labeled "Xu, Jian") before 9am. | Due: May 27 |
| June 5 |
Due: June 2
Introduction to caches: For a direct-mapped cache design with a 32-bit address and byte-addressable memory, the following bits of the address are used to access the cache:
Tag Index Offset
a. 31-10 9-5 4-0
b. 31-12 11-6 5-0
For each configuration (a and b):
0x1000
0x1004
0x1010
0x11c0
0x2000
0x21c0
0x3400
0x3404
0x3f00
0x2004
0x1004
a. 32-bit operating system, 4-KB pages, 1 GB of RAM
b. 32-bit operating system, 16-KB pages, 2 GB of RAM
c. 64-bit operating system, 16-KB pages, 16 GB of RAM
| Config. | V. Addr. | P. Addr. | V. Page # | P. Page # | Offset |
|---|---|---|---|---|---|
| a | |||||
| b | |||||
| c |
Using the TLB. As described in your textbook, virtual memory uses a page table to track the mapping of virtual addresses to physical addresses. To speed up this translation, modern processors implement a cache of the most recently used translations, called the translation-lookaside buffer (TLB). This exercise shows how the page table and TLB must be updated as addresses are accessed.
The following list is a stream of virtual addresses as seen on a system. Assume 4-KB pages and a four-entry fully associative TLB with LRU replacement policy. If pages must be brought in from disk, give them the next largest unused page number (i.e., starting at 13).
| Address | Result (H, M, PF) |
|---|---|
| 0x0FFF | |
| 0x7A28 | |
| 0x3DAD | |
| 0x3A98 | |
| 0x1C19 | |
| 0x1000 | |
| 0x22D0 |
Initial TLB: (Note: Values are in base-10)
| Valid | Tag | Physical Page # | LRU |
|---|---|---|---|
| 1 | 11 | 12 | 2 |
| 1 | 7 | 4 | 3 |
| 1 | 3 | 6 | 4 |
| 0 | 4 | 9 | 1 |
Initial Page Table: (Note: Values are in base-10)
| Index | Valid | Physical Page or On Disk |
|---|---|---|
| 0 | 1 | 5 |
| 1 | 0 | Disk |
| 2 | 0 | Disk |
| 3 | 1 | 6 |
| 4 | 1 | 9 |
| 5 | 1 | 11 |
| 6 | 0 | Disk |
| 7 | 1 | 4 |
| 8 | 0 | Disk |
| 9 | 0 | Disk |
| 10 | 1 | 3 |
| 11 | 1 | 12 |
| Deliverable | Place your typed (or well written) solutions to the problems in Qi's campus mailbox before 9 am. | Due: June 2 |