1 / 38

COSC 3330/6308 Solutions to the Third Problem Set

COSC 3330/6308 Solutions to the Third Problem Set. Jehan-François Pâris November 2012. First problem.

adora
Download Presentation

COSC 3330/6308 Solutions to the Third Problem Set

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. COSC 3330/6308Solutions to theThird Problem Set Jehan-François PârisNovember 2012

  2. First problem • You are to design a TLB for a virtual memory system with 64-bit addresses and 4-kilobyte pages. It should have with 64 entries with each entry mapping one virtual page into one physical page. You are to consider two possible TLB organizations, namely • One using direct mapping • Another using two-way set associativity.

  3. Part A • What would be the minimum sizes in bits of the entry tags for each of these two cache organizations? (2×5 easy points)

  4. Answer • For the direct mapping organization • Entry tag is page number • Page number is 64 – log2 4096 = 52 bits • Last log2 64 = 6 bits of tag are given by the entry index • Minimum size of tag is 52 – 6 = 46 bits

  5. Answer • For the two-way set associative organization • Entry tag is page number • TLB has 32 lines each with two entries • Page number is still 52 bits • Last log2 32 = 5 bits of tag are given by the entry index • Minimum size of tag is 52 – 5 = 47 bits

  6. Part B • Describe at the bit level how the hardware should access each of these caches?

  7. Answer • For the direct mapping organization • TLB has 64 lines • Use log2 64 = 6 least significant bits of page number as index • If page number matches the tag : • Get page frame number and bits else : • Declare a TLB miss

  8. Answer • For the two-way associative organization • TLB has 32 lines and 2 entries per line • Use log2 32 = 5 least significant bits of page number as index • If page number matches tag of one of the two entries : • Get page frame number and bits else : • Declare a TLB miss

  9. Part C • How will each of the two TLBs handle collisions? (2 + 8 points for a detailed solution)

  10. Answer • For the direct mapping organization • Entry that was not in the TLB replaces old TLB entry whose page number had samelog2 64 = 6 least significant bits

  11. Answer • For the two-way set associative organization • Entry that was not in the TLB will replace one on the two old TLB entries whose page number had same log2 32 = 5 least significant bits • Should select Least Recently Used entry • Will add to cache an extra bit set to • Zero when first entry of line is accessed • One when second entry is accessed

  12. Part D • Measurements on the direct mapping cache indicate that • 80 percent of the misses are compulsory misses • 19 percent of them are capacity misses • Remaining misses are all associativity misses. What conclusions can you draw? (5 points)

  13. Answer • Only one percent of misses are associativity misses • Should use simpler, faster direct mapping organization

  14. Second problem • A given make of disks has a failure rate of 5 percent per year.

  15. Part A • What is the mean time to failure of these disks? (5 easy points)

  16. Answer • What is the mean time to failure of these disks? (5 easy points) • Failure rate is 5 percent per year • One failure every 20 years • MTTF is 20 years

  17. Part B • Assuming that all data are mirrored on two disks, and that it takes twelve hours to replace a failed disk and restore its contents, what is the probability that a single disk failure will lead to a data loss? (5 points)

  18. Answer • Assuming that all data are mirrored on two disks, and that it takes twelve hours to replace a failed disk and restore its contents, what is the probability that a single disk failure will lead to a data loss? (5 points) • Probability of second failure while first disk gets repaired is ½ 1/365  0.05 = 6.85 10-5

  19. Part C • Consider a disk farm consisting of 100 pairs of mirrored disks for a total of 200 disks. • What would be the probability of a data loss over a period of five years?

  20. Simplest Answer • Probability a given disk fails during the five years5  0.05 = 0.25 • Probability a given disk fails and it leads to a data loss0.25  6.85 10-5 = 1.71 10-5 • Probability any of the 200 disk fails and it leads to a data loss1.71 10-5  200 = 3.42 10-3

  21. More rigorous answer (I) • Probability a given disk fails during the five years5  0.05 = 0.25 • Probability a given disk fails and it leads to a data loss0.25  6.85 10-5 = 1.71 10-5 • Probability a pair experiences a data loss2  1.71 10-5 = 3.42 10-5 • Probability a pair experiences no data loss1 - 3.42 10-5 = 0.999965753

  22. More rigorous answer (II) • Probability array experiences no data loss0.999965753100 = 0.996581141 • Probability of a data loss1 – 0.996581141 = 3.42 10-3

  23. How is that possible? • For very small values of x (1 – x)n 1 – nx

  24. Third problem • A file server crashes on the average once every ten days.

  25. Part A • What is the mean time between failures of this server? (5 points)

  26. Answer • What is the mean time between failures of this server? (5 points) • One failure every ten days • MTBF is ten days

  27. Part B • What is the maximum mean time to repair that we can tolerate if we want to achieve an average availability of 99.5 percent? (5 points)

  28. Answer • What is the maximum mean time to repair that we can tolerate if we want to achieve an average availability of 99.5 percent? (5 points) • We have • MTTF + MTTR = 10 days • MTTF/(MTTF + MTTR) = 0.995 • MTTF/10 = 0.995MTTF = 0.95 daysMTTR = 0.05 days =1.2 hours

  29. Fourth problem • A RAID level 6 array has • Eight data blocks (b0 to b7) • Two parity blocks p and q per stripe.

  30. Part A • How much of the total disk space is used by data blocks? (5 easy points)

  31. Answer • How much of the total disk space is used by data blocks? (5 easy points) • 8/(8 + 2) = 0.8 or 80 percent

  32. Part B • What is the best way to update block b5 and its two parity blocks? (10 points)

  33. Answer • What is the best way to update block b5 and its two parity blocks? (10 points) • Read old block b5, old parity block p and old parity blockq • Computenew p = old p old b5  new d new q = old q old b5  new d • Write new b5, new p and new q Give full credit to people who do not have the formulas

  34. Fifth problem • A task is distributed along 128 processors but the maximum observed speedup is only 50. • People suspect that this low figure is due to a single processor. • What is the share of the workload that is executed by that processor? (5 points)

  35. Answer • A task is distributed along 128 processors but the maximum observed speedup is only 50. • People suspect that this low figure is due to a single processor. • What is the share of the workload that is executed by that processor? (5 points) • 1/50 of the workload

  36. Sixth problem • People in your research group are unhappy with the speed of the computer they use to run a huge program. • Somebody suggests upgrading the CPU of the computer. • What do we need to know before deciding to do so? (5 points)

  37. Answer • The question is whether it would be really help • Must know the • Peak Memory BW • Arithmetic Intensity of program • If Peak Memory BWArithmetic Intensity isless than the Peak Floating-Point Performanceupgrading the CPU will not help

  38. Another very good answer • If the CPU has multiple cores,check whether the program can use the multiple cores in parallel

More Related