Upload
wraith324
View
237
Download
0
Embed Size (px)
Citation preview
8/12/2019 5 5 Reading Quiz
http://slidepdf.com/reader/full/5-5-reading-quiz 1/21
!"# %&% '()*+,- ./+0 "/11)23
8/12/2019 5 5 Reading Quiz
http://slidepdf.com/reader/full/5-5-reading-quiz 2/21
• During execution where does theprogram in a “stored program computer”
reside? Letter Answer
A The hard disk.
B Memory
C The “cloud”
D The register file
E Instructions
2
8/12/2019 5 5 Reading Quiz
http://slidepdf.com/reader/full/5-5-reading-quiz 3/21
• What are two of three operands types inMIPS?
!"#"$ &'()"$
4 5/67 ),* 589
: ";)<= ),* >+6=
! ?(1823 ),* 2(-+6;(26
> @11(*+);( ),* 4992892+);(
# @19A+<+; ),* (B9A+<+;
3
8/12/2019 5 5 Reading Quiz
http://slidepdf.com/reader/full/5-5-reading-quiz 4/21
• Instructions that allow programs to makedecisions are called?
!"#"$ &'()"$
4 C82=6
: D8+,6
! "E+;<7(6
> F()G(6
# :2),<7(6
4
8/12/2019 5 5 Reading Quiz
http://slidepdf.com/reader/full/5-5-reading-quiz 5/21
• Arguments are passed first ______ andthen, if more space is needed, ______.
!"#"$ &'()"$
4 H, *+6=I +, ;7( <A8/*
: @, 2(-+6;(26J 8, ;7( 6;)<=
! H, ;7( 6;)<=J +, 2(-+6;(26
> K,<8192(66(*J <8192(66(*
# :)<=E)2*6J /9E)2*6
5
8/12/2019 5 5 Reading Quiz
http://slidepdf.com/reader/full/5-5-reading-quiz 6/21
• The compilers converts…
!"#"$ &'()"$
4 >8AA)26 ;8 :+; !8+,6
: :+-L(,*+), ;8 A+MA(L(,*+),
! '(-+6;(26 ;8 6;)<= A8<)N8,6
> "8/2<( <8*( ;8 )66(1OA3
# 4"!@@ ;8 :+,)23
6
8/12/2019 5 5 Reading Quiz
http://slidepdf.com/reader/full/5-5-reading-quiz 7/21
• Which ISA runs in most cell phones andtablets?
Letter Answer A ARM
B x86
C MIPS
D VLIW
E CISC
7
8/12/2019 5 5 Reading Quiz
http://slidepdf.com/reader/full/5-5-reading-quiz 8/21
• Was the full x86 instruction set we havetoday carefully planned out?
Letter Answer A Yes
B I wish I could unlearn everything I know
about x86. I feel unclean.
C Are you kidding? I’ve never seen a more
poorly planned ISA! D *sob*
E B, C, or D
8
8/12/2019 5 5 Reading Quiz
http://slidepdf.com/reader/full/5-5-reading-quiz 9/21
• Why did AMD and ARM (and MIPS)introduce 64-bit versions of their ISAs?
Letter Answer A To make the CPU smaller.
B Support more memory
C To allow for more opcodes
D B and C
E A and B
9
8/12/2019 5 5 Reading Quiz
http://slidepdf.com/reader/full/5-5-reading-quiz 10/21
• X86 Registers…
Letter Answer A Have fixed functions
B Are generic, like in MIPS
C Were originally (in 1978) 64 bits wide
D Are implemented in main memory
E None of the above.
10
8/12/2019 5 5 Reading Quiz
http://slidepdf.com/reader/full/5-5-reading-quiz 11/21
• Which of these is Amdahl’s law?
Letter Answer A Stot = 1/(S/x+(1-x))
B EP = IC * CPI * CT
C Stot = x/S+(1-x)
D Stot = 1/(x/S + (1 – x))
E E = MC^2
11
8/12/2019 5 5 Reading Quiz
http://slidepdf.com/reader/full/5-5-reading-quiz 12/21
• Which of these is the CPU performanceequation?
Letter Answer A Runtime = Inst/program * Clock cyles/
Instruction *Seconds/clock cycle
B Runtime = Inst/program + clock cycles/
instruction + seconds/clock cycle
C Runtime = Latency before/latency after
D Runtime = Bytes/Second
E None of the above
12
8/12/2019 5 5 Reading Quiz
http://slidepdf.com/reader/full/5-5-reading-quiz 13/21
• Bandwidth is a better measure ofperformance than latency…
Letter Answer A Always
B Sometimes
C For high-performance machine
D More so now than in the past
E In computers that consume lots of power
13
8/12/2019 5 5 Reading Quiz
http://slidepdf.com/reader/full/5-5-reading-quiz 14/21
• As voltage rises…
Letter Answer A Power consumption varies periodically
B Power consumption is not a"ected
C Power consumption increases quickly
D Runtime increases
E Speedup is undefined
14
8/12/2019 5 5 Reading Quiz
http://slidepdf.com/reader/full/5-5-reading-quiz 15/21
• Benchmarks…
Letter Answer A Are perfect measures of performance.
B Need to be re-implemented for every
computer
C Denote comments in C
D Craminate gracefully
E Are supposed to represent common
programs. 15
8/12/2019 5 5 Reading Quiz
http://slidepdf.com/reader/full/5-5-reading-quiz 16/21
• Amdahl’s Law…
Letter Answer A Argues for making the common case fast
B Limits the improvement an optimization
can provide.
C Is a characteristic specifically of CMOS
technology. D A and B
E All of the above.
16
8/12/2019 5 5 Reading Quiz
http://slidepdf.com/reader/full/5-5-reading-quiz 17/21
• Pipelining…
Letter Answer A Allows the execution of multiple instructions to
overlap
B Prevents branch articulation
C Significantly decreases the amount of time it
takes to execute a particular instruction
D Significantly increases the amount of time it
takes to implement a particular instruction
E A and D 17
8/12/2019 5 5 Reading Quiz
http://slidepdf.com/reader/full/5-5-reading-quiz 18/21
• Pipelining…
Letter Answer A Increases instruction count
B Reduces CPI
C Reduces cycle time
D Has no e"ect on performance
E B and C
18
8/12/2019 5 5 Reading Quiz
http://slidepdf.com/reader/full/5-5-reading-quiz 19/21
• Data hazards…
Letter Answer A Occur because a value is not ready when it’s
needed
B Occur because the next PC is not yet known.
C Cannot be removed.
D A and B
E All of the above
19
8/12/2019 5 5 Reading Quiz
http://slidepdf.com/reader/full/5-5-reading-quiz 20/21
• Stalling a processor…
Letter Answer A Reduces CPI and increases instruction count.
B Means that instructions early in the pipeline
stop making progress
C Can resolve some hazards.
D B and C
E A and C
20
8/12/2019 5 5 Reading Quiz
http://slidepdf.com/reader/full/5-5-reading-quiz 21/21
• Forwarding…
Letter Answer A Is just for email.
B Allows the processor to resolve control
hazards.
C Improves CPI
D Reduces cycle time
E Interacts poorly with stalling.
21