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

Slides:



Advertisements
Similar presentations
Virtual Memory In this lecture, slides from lecture 16 from the course Computer Architecture ECE 201 by Professor Mike Schulte are used with permission.
Advertisements

COSC 3330/6308 Solutions to Second Problem Set Jehan-François Pâris October 2012.
CA 714CA Midterm Review. C5 Cache Optimization Reduce miss penalty –Hardware and software Reduce miss rate –Hardware and software Reduce hit time –Hardware.
1 Improving Direct-Mapped Cache Performance by the Addition of a Small Fully-Associative Cache and Prefetch Buffers By Sreemukha Kandlakunta Phani Shashank.
Chapter 3 Presented by: Anupam Mittal.  Data protection: Concept of RAID and its Components Data Protection: RAID - 2.
Cs 325 virtualmemory.1 Accessing Caches in Virtual Memory Environment.
Modularized Redundant Parallel Virtual System
Spring 2003CSE P5481 Introduction Why memory subsystem design is important CPU speeds increase 55% per year DRAM speeds increase 3% per year rate of increase.
Memory Management Norman White Stern School of Business.
CSCE 212 Chapter 7 Memory Hierarchy Instructor: Jason D. Bakos.
Memory Management (II)
Review CPSC 321 Andreas Klappenecker Announcements Tuesday, November 30, midterm exam.
Lecture 3: A Case for RAID (Part 1) Prof. Shahram Ghandeharizadeh Computer Science Department University of Southern California.
ENEE350 Ankur Srivastava University of Maryland, College Park Based on Slides from Mary Jane Irwin ( )
Virtual Memory and Paging J. Nelson Amaral. Large Data Sets Size of address space: – 32-bit machines: 2 32 = 4 GB – 64-bit machines: 2 64 = a huge number.
Virtual Memory Topics Virtual Memory Access Page Table, TLB Programming for locality Memory Mountain Revisited.
Answers to the VM Problems Spring First question A computer has 32 bit addresses and a virtual memory with a page size of 8 kilobytes.  How many.
1  1998 Morgan Kaufmann Publishers Chapter Seven Large and Fast: Exploiting Memory Hierarchy (Part II)
11/10/2005Comp 120 Fall November 10 8 classes to go! questions to me –Topics you would like covered –Things you don’t understand –Suggestions.
COEN 180 Main Memory Cache Architectures. Basics Speed difference between cache and memory is small. Therefore:  Cache algorithms need to be implemented.
Storage System: RAID Questions answered in this lecture: What is RAID? How does one trade-off between: performance, capacity, and reliability? What is.
Virtual Memory Main Memory Magnetic Disk Upper level Lower level.
Chapter VIII Virtual Memory Review Questions Jehan-François Pâris
ICOM 6005 – Database Management Systems Design Dr. Manuel Rodríguez-Martínez Electrical and Computer Engineering Department Lecture 6 – RAID ©Manuel Rodriguez.
I/O – Chapter 8 Introduction Disk Storage and Dependability – 8.2 Buses and other connectors – 8.4 I/O performance measures – 8.6.
Redundant Array of Inexpensive Disks aka Redundant Array of Independent Disks (RAID) Modified from CCT slides.
Computer Architecture Lecture 28 Fasih ur Rehman.
CMPE 421 Parallel Computer Architecture
The Memory Hierarchy 21/05/2009Lecture 32_CA&O_Engr Umbreen Sabir.
IT253: Computer Organization
CSIE30300 Computer Architecture Unit 08: Cache Hsin-Chou Chi [Adapted from material by and
1 Virtual Memory and Address Translation. 2 Review Program addresses are virtual addresses.  Relative offset of program regions can not change during.
Virtual Memory. Virtual Memory: Topics Why virtual memory? Virtual to physical address translation Page Table Translation Lookaside Buffer (TLB)
Review (1/2) °Caches are NOT mandatory: Processor performs arithmetic Memory stores data Caches simply make data transfers go faster °Each level of memory.
Virtual Memory 1 1.
Operating Systems ECE344 Ashvin Goel ECE University of Toronto Demand Paging.
1  2004 Morgan Kaufmann Publishers Chapter Seven Memory Hierarchy-3 by Patterson.
CHAPTER 3-3: PAGE MAPPING MEMORY MANAGEMENT. VIRTUAL MEMORY Key Idea Disassociate addresses referenced in a running process from addresses available in.
Virtual Memory Review Goal: give illusion of a large memory Allow many processes to share single memory Strategy Break physical memory up into blocks (pages)
1 Lecture: Virtual Memory Topics: virtual memory, TLB/cache access (Sections 2.2)
Solution to the Second COSC 6360 Quiz for Fall 2013 Jehan-François Pâris
Virtual Memory 1 Computer Organization II © McQuain Virtual Memory Use main memory as a “cache” for secondary (disk) storage – Managed jointly.
Chapter 9 Memory Organization. 9.1 Hierarchical Memory Systems Figure 9.1.
RAID TECHNOLOGY RASHMI ACHARYA CSE(A) RG NO
Computer Orgnization Rabie A. Ramadan Lecture 9. Cache Mapping Schemes.
Translation Lookaside Buffer
Computer Organization
Memory Management Virtual Memory.
Improving Memory Access The Cache and Virtual Memory
Main Memory Cache Architectures
Memory COMPUTER ARCHITECTURE
RAID Redundant Arrays of Independent Disks
Vladimir Stojanovic & Nicholas Weaver
Multilevel Memories (Improving performance using alittle “cash”)
Virtual Memory Use main memory as a “cache” for secondary (disk) storage Managed jointly by CPU hardware and the operating system (OS) Programs share main.
Morgan Kaufmann Publishers Large and Fast: Exploiting Memory Hierarchy
Solutions for Second Quiz
Morgan Kaufmann Publishers
RAID RAID Mukesh N Tekwani
ICOM 6005 – Database Management Systems Design
FIGURE 12-1 Memory Hierarchy
Main Memory Cache Architectures
Solutions for the Third Problem Set
RAID RAID Mukesh N Tekwani April 23, 2019
Solutions for Third Quiz
Cache - Optimization.
Virtual Memory Use main memory as a “cache” for secondary (disk) storage Managed jointly by CPU hardware and the operating system (OS) Programs share main.
Operating Systems: Internals and Design Principles, 6/E
Virtual Memory 1 1.
Presentation transcript:

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

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.

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)

Answer  For the direct mapping organization Entry tag is page number Page number is 64 – log = 52 bits Last log 2 64 = 6 bits of tag are given by the entry index Minimum size of tag is 52 – 6 = 46 bits

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 log 2 32 = 5 bits of tag are given by the entry index Minimum size of tag is 52 – 5 = 47 bits

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

Answer For the direct mapping organization  TLB has 64 lines  Use log 2 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

Answer For the two-way associative organization  TLB has 32 lines and 2 entries per line  Use log 2 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

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

Answer For the direct mapping organization  Entry that was not in the TLB replaces old TLB entry whose page number had same log 2 64 = 6 least significant bits

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 log 2 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

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)

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

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

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

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

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)

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 =

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?

Simplest Answer Probability a given disk fails during the five years 5  0.05 = 0.25 Probability a given disk fails and it leads to a data loss 0.25  = Probability any of the 200 disk fails and it leads to a data loss  200 =

More rigorous answer (I) Probability a given disk fails during the five years 5  0.05 = 0.25 Probability a given disk fails and it leads to a data loss 0.25  = Probability a pair experiences a data loss 2  = Probability a pair experiences no data loss =

More rigorous answer (II) Probability array experiences no data loss = Probability of a data loss 1 – =

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

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

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

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

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)

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) =  MTTF/10 = MTTF = 0.95 days MTTR = 0.05 days = 1.2 hours

Fourth problem A RAID level 6 array has  Eight data blocks (b 0 to b 7 )  Two parity blocks p and q per stripe.

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

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

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

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

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)

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

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)

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 is less than the Peak Floating-Point Performance upgrading the CPU will not help

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