Fall 2008
ECE608, Homework #10 Solution
Tuesday, December 9, 2008
(1) CLR 22.1-6
We are looking for a universal sink i.e., a vertex with in degree of |V | 1 and out
degree of zero. In the adjacency ma
Fall 2010
ECE608, Homework #12 Solution
(1) CLR 34.1-1
(a) If Longest-Path P, then we can come up with an algorithm Longest-PathLength(G, u, v ).
Longest-Path-Length(G, u, v )
1. for k = |V | 1 to 1
2
ECE608, Homework #11 Solution
(1) CLR 24.1-3
The proof of Lemma 24.2 shows that for every v , d[v ] has attained its nal value after
length (any shortest-weight path to v ) iterations of Bellman-Ford.
ECE608, Homework #11
(1) CLR 24.1-3 The algorithm is not told m, but must terminate even so in m + 1 passes.
(2) CLR 24.1-4
(3) CLR 24.2-4
(4) CLR 24.3-2
(5) CLR 24.3-10
(6) CLR 24-2
(7) CLR 25.1-9
(8
ECE608, Homework #9 Solution
(1) CLR 16.1-3
Let S be the set of n activities. The obvious solution of using Greedy-ActivitySelector to nd a maximum-size set S 1 of compatible activities from S for the
ECE608 Homework #7 Solution
(1) CLR 11.1-1
To nd the maximum element of the set S , it requires searching the entire table T
in the worst case. Note that NIL is returned if there are no elements in th
ECE608 Homework #6 Solution
(1) CLR 8.1-3
If the sort runs in linear time for m input permutations, then the height h of those
paths of the decision tree consisting of the m corresponding leaves and t
ECE608 Homework #5 Solution
(1) CLR 6.1-6
No, 23, 17, 14, 6, 13, 10, 1, 5, 7, 12 is not a heap because the heap property does not
hold between the 4th element and its second child, the 9th element (i.
ECE608 Homework #4 Solution
(1) CLR 5.1-3
Perform two calls to BIASED-RANDOM obtaining two bits. The following outcomes
are possible with the shown probability:
1) 1 and 0 with probability = p(1 p)
2)
ECE608, Homework #3 Solution
(1) CLR 4.3-9
T (n) = 3T ( n) + lg n.
Change variables to m = lg n n = 2m .
T (2m ) = 3T (2m/2 ) + m.
Change functions to S (m) = T (2m ).
S (m) = 3S ( m ) + m.
2
This is
ECE565: Computer
Architecture
Instructor: Vijay S. Pai
Fall 2011
ECE 565, Fall 2011
1
This Unit: Shared Memory Multiprocessors
Application
Three issues
OS
Compiler
CPU
Firmware
I/O
Memory
Digital Cir
ECE565: Computer
Architecture
Instructor: Vijay S. Pai
Fall 2011
ECE 565, Fall 2011
1
This Unit: Multithreading (MT)
Application
Why multithreading (MT)?
OS
Compiler
CPU
Firmware
Utilization vs. per
ECE565: Computer
Architecture
Instructor: Vijay Pai
Fall 2011
ECE 565, Fall 2011
1
This Unit: Main Memory
Application
OS
Compiler
CPU
Firmware
Memory hierarchy review
Virtual memory
Address transla
ECE565: Computer
Architecture
Instructor: Vijay S. Pai
Fall 2011
Course administration: via Blackboard
ECE 565, Fall 2011
1
This Unit: Data/Thread Level Parallelism
Application
Data-level parallelism
ECE565: Computer
Architecture
Instructor: Vijay S. Pai
Fall 2011
ECE 565, Fall 2011
1
This Unit: Dynamic Scheduling II
Application
Previously: dynamic scheduling
OS
Compiler
CPU
Firmware
I/O
Memory
D
The Problem With In-Order Pipelines
addf f0,f1,f2
mulf f2,f3,f2
subf f0,f1,f4
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
F D E+ E+ E+ W
F D d* d* E* E* E* E* E* W
F p* p* D E+ E+ E+ W
Whats happening in
ECE565: Computer
Architecture
Instructor: Vijay S. Pai
Fall 2011
Course administration: via Blackboard
ECE 565, Fall 2011
1
Lots of Parallelism
Last unit: pipeline-level parallelism
Work on execute
ECE565: Computer
Architecture
Instructor: Vijay S. Pai
Lecture TA: None
Fall 2011
Course administration: via Blackboard
Acknowledgements and Disclaimer
Slides developed by Amir Roth of University of
ECE565: Computer
Architecture
Instructor: Vijay S. Pai
Fall 2011
Acknowledgements and
Disclaimer
Slides developed by Amir Roth of University
of Pennsylvania with sources that included
University of Wi
ECE565: Computer
Architecture
Instructor: Vijay S. Pai
Lecture TA: None
Fall 2011
Course administration: via Blackboard
Acknowledgements and
Disclaimer
Slides developed by Amir Roth of University
of
Name:_
I. (5 0 p o in ts ) M u ltip le c h o ic e /s h o r t r e s p o n s e Q u e s tio n s (2 0 + 3 0 )
a . P r o v id e o n e te c h n iq u e e a c h to a d d r e s s th e fo llo w in g ty p e s o