Home |
Suggestion Box |
Refute: The complexity of instructions is the most important difference. The number of instructions in the ISA is a side-affect of this. Similarly, number of instructions in a program trace is also an effect of the complexity of the instructions in the ISA.
Keyboard | IL1 |
---|---|
Reset/Reboot Button | IL3 |
Disk Drive | IL2 |
Network Interface | IL2 |
Mouse | IL1 |
Memory Allocation | IL2 |
No, the reboot button should shut the machine down regardless of what it is currently doing.
However, several students gave suggestions, such as putting a routine to save state at a higher level of interrupt so that a dump could be made when the system crashes. This reasoning is correct, but if your system is really screwed up, it may not be capable of running even this sort of program, so this may not be a useful feature.
In terms of the performance of the system with respect to other machines that will be on the market when it will be released, is it better to release the system on its current schedule, or to add the improvement and move back the release by six months?
A 19% improvement means performance will be 1.19 times current performance.
If 2^(6/24) > 1.19, then performance improvement will not keep up with the average improvements in the market.
2^(6/24) = 1.189, or roughly the same as what the market will have.
Those who said that the decision doesn't matter received 14 out of 15 points. But a number of students gave additional reasons, such as economic advantages in getting a product to market early, that led them to conclude that releasing the product early was a better choice. Valid reasons along these lines received 15 points.
f
has the following parameters,
where `constant or variable' says whether assignments to the parameter
within f
also effect the parameter in main
(e.g.
variable = var
in Pascal or &
in C).
Using the Feldman and Retter (F&R) conventions, say whether a copy of
the parameter must be made before calling f
, specify what
exactly is passed and where it is passed.
inputs | |||||
---|---|---|---|---|---|
name | const/var | type | copy? | how pass | location |
AS | const | array of strings | Y | Address | R0 |
I1 | const | integer | N | Value | R1 |
F1 | const | float | N | Value | F0 |
I2 | var | integer | N | Address | R2 |
AI | var | array of integers | N | Address | R3 |
F2 | var | float | N | Address | R4 |
result | |||||
R | array of integers | N | Address | R0 |
CPU | Rabbit | Turtle |
---|---|---|
Clock speed | 300MHz | 100MHz |
ICache size | 16Kb | 8Kb |
DCache size | 16Kb | 8Kb |
Number of inst issue units | 2 | 4 |
Avg number of instructions issued per cycle | 1.17 | 3.25 |
Number of instructions per trace | 1.1*(#Inst_T) | (#Inst_T) |
Number of transistors | 9.3*(10^6) | 7.5*(10^6) |
CPI = cycles per instruction
IPC = instructions per cycle
CPI = 1/IPC
CPI_Rabbit
= 1/1.17
= 0.855
CPI_Turtle
= 1/3.25
= 0.308
Time = (#Inst)*(CPI)*(Clock)
Time_Rabbit
= 1.1*(#Inst_T)*(0.855)*(1/(300E+6))
= 3.14*(10^-9)
Time_Turtle
= (#Inst_T)*(0.308)*(1/(100E+6))
= 3.08*(10^-9)
Turtle is faster.
%Faster:
= (Time_Rabbit - Time_Turtle)/Time_Turtle
= (3.14*(10^-9) - 3.08*(10^-9) ) / 3.08*(10^-9)
= 1.8%
In C, if p is a pointer to an element in some array, p++ increments p so that its value is the address of the next element in the array.
; assume that R3 holds address of p
LADDx R3, 1, R3
; p is a *byte
; byte addressing uses indexed addressing mode
; assume that (R3,R4) is address of p
; so, access *p using (R3,R4)
LADDx R4, 1, R4
Note: This question was marked based on how well you defended your point in terms of the issues you raised in the previous question. In particular I was looking for something like: `X is better than Y, because the advantage A of X is more important than the disadvantage B.'
My opinion:
Byte addressing is better than word addressing because, as was demonstrated in homework and in this test, some very common operations are more difficult to do with word addressing than with byte addressing. In particular, the nasty pointer arithmetic that is possible in C becomes very difficult to implement safely word addressing. While the lack of alignment problems is a nice feature, the difficulty in porting code to this architecture will probably prevent many programs from embracing it.
Home |
Suggestion Box |