

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Material Type: Assignment; Professor: Gehringer; Class: Architecture Of Parallel Computers; Subject: Electrical and Computer Engineering; University: North Carolina State University; Term: Unknown 1989;
Typology: Assignments
1 / 3
This page cannot be seen from the preview
Don't miss anything!


Problems 2, 3, and 5 will be graded. There are 60 points on these problems. Note: You must do all the problems, even the non-graded ones. If you do not do some of them, half as many points as they are worth will be subtracted from your score on the graded problems.
Problem 1. (15 points) Page 12 of the lecture notes for Lecture 3 (titledCommunication architectures, cont.) presents an assembly-language version of the inner loop of a vector- processor matrix-multiplication program whose pseudocode is given on page 10 of the same lecture. Write the assembly code for the entire program (i.e., the program on page 10), using the code already given on page 12. Please make sure that your program is well commented; however, you do not have to comment portions that you use without change from page 12.
Problem 2 .(15 points) Suppose a program that was being run on one processor is now run on a 100-processor machine. If a speedup of 80 is desired (on the 100-processor machine, as compared to the single processor), what fraction of the program can be serial? Use Amdahl’s law.
Problem 3. (25 points) Main memory for a processor consists of 1,024K words (2 20 addresses). We would like to design a cache that contains 16K words (2^14 addresses) that minimizes the average access time (AAT) for a given program. There are 16 words per cache line.
(a) How many cache lines are there?
(b) If a direct-mapped cache is used, how many bits make up the tag field?
(c) Consider a program that accesses the following 16 hexadecimal memory words in sequence:
5A 5A 5A 5A 4A 4A 4A 4A 5A 5A 5A 5A 4A 4A 4A 4A
Fill in the following table with the tag values and the first word on the line for each of the first four cache lines, after the program makes the above 16 memory accesses.
Line Tag (binary) First Word (Hexadecimal)
(d) How many cache misses in this code fragment, assuming the cache is initially empty?
(e) How many of the above cache misses are cold (compulsory) misses, how many are conflict misses, and how many are capacity misses?
(f) If the hit time is 10 ns and the miss penalty is 200 ns, what is the average access time for this direct-mapped cache?
(g) When memory references have the same low-order bits, they are constantly in contention for thesame four cache lines. This makes very poor use of the 1024-line cache. What would be a more efficient cache organization for this program? Why is this scheme better than direct- mapped? Please give the number of sets and the number of tag bits for this scheme.
(h) How many cache misses would occur with your new cache scheme, assuming the cache was initially empty?
(i) How many of the above cache misses are cold (compulsory) misses, how many are conflict misses, and how many are capacity misses?
(j) What is the average access time for your new cache organization?