COMP 620 Homework#2

.pdf

School

California State University, Northridge *

*We aren’t endorsed by this school

Course

620

Subject

Computer Science

Date

Oct 30, 2023

Type

pdf

Pages

9

Uploaded by MasterGalaxyJaguar25

Report
Homework #2, 14-Multiple Choice Questions and 5-Essay Type Questions Deadline: Due by 11:59 p.m., October 11. 2023. Please Answer all Questions in BLUE color if applicable 1. For cache memory, locality is traditionally exploited by keeping recently used instruction and data values in cache memory and by exploiting a cache hierarchy. A. sequential B. direct access C. reference D. temporal 2. __________ is a random access type of memory that enables one to make a comparison of desired bit locations within a word for a specified match, and to do this for all words simultaneously. A. Direct access B. Associative access C. Unified cache D. Execution logic 3. For random access memory, __________ is the time from the instant that an address is presented to the memory to the instant that data have been stored or made available for use. A. access time B. memory cycle time C. transfer rate D. performance 4. For main memory, is the number of bits read out of or written into memory at a time. A. addressable units B. capacity C. unit of transfer D. direct unit 5. is a design principle which means that copies of the same data unit in adjacent memory levels must be consistent. A. Locality B. Coherence C. Inclusion D. Static 6. The cache is slower and typically larger than the L2 cache.
A. L1 B. L2 C. L3 D. L4 7. is the minimum unit of transfer between cache and main memory. A. Frame B. Tag C. Block D. Line 8. The principal disadvantage of mapping is the complex circuitry required to examine the tags of all cache lines in parallel. A. set-associative B. associative C. stack mapping D. direct 9. The __________ replacement algorithm replaces the block in the set that has been in the cache longest with no reference to it. A. LRU B. CLM C. FIFO D. LFU 10. The _________ replacement algorithm replaces the block in the set that has been in the cache longest. A. LFU B. LCA C. FIFO D. LRU 11. The __________ policy dictates that a piece of data in one cache is guaranteed to be also found in all lower levels of caches. A. noninclusive B. write allocate C. inclusive D. exclusive 12. The __________ policy dictates that a piece of data in one cache is guaranteed not to be found in all lower levels of caches.
A. write allocate B. exclusive C. write through D. inclusive 13. __________ can be caused by harsh environmental abuse, manufacturing defects, and wear. A. SEC errors B. Hard errors C. Syndrome errors D. Soft errors 14. _________ can be caused by power supply problems or alpha particles. A. Soft errors B. AGT errors C. Hard errors D. SEC errors Question 15: On the Motorola 68020 microprocessor, cache access takes two clock cycles. Data access from the main memory over the bus to the processor takes three clock cycles in the case of no wait state insertion; the data are delivered to the processor in parallel with delivery to the cache. a) Calculate the effective length of a memory cycle given a hit ratio of 0.9 . (i.e., one clock cycle equals 60 ns.) b) Repeat the calculation assuming insertion of two wait states of one cycle each per memory cycle. What conclusion can you draw from the result in terms of performance and average access time? Solution : Given, One Clock Cycle = 60ns Cache Access Takes 2 clock cycles = 2*60= 120ns Data access from the main memory over the bus to the processor takes 3 clock cycles Therefore, Memory Access Time = 3*60 = 180ns a) Effective Length of Memory Cycle = (Hit Ratio * Cache Access) + (Miss Rate * Main Memory Access Time) Given That, Hit Ratio = 0.9 So Miss Ratio Will be = 0.1 Effective Length of Memory Cycle = (0.9 * 120) + (0.1 * 180) = 108+ 18 = 126ns Therefore, Effective Length of Memory Cycle is 126ns
b) Assume 2 wait states Clock Cycle = 2*60 = 120ns Cache Access Time = 2 Clock Cycle Main Memory Access Time = 3+2= 5 clock cycles= 5 * 60 = 300ns Effective length of Memory Cycle = (Hit ratio * Cache Access time) + (1-Hit Ratio) * Main Memory = 0.9 * 120 + (1- 0.9) * 300 = 108 + 30 Effective length of Memory Cycle = 138ns In Conclusion we can say that, By inserting wait states the average access time increases which degrades performance. Question 16: Consider a single-level cache with an access time of 2.5 ns, a block size of 64 bytes, and a hit ratio of H = 0.95. Main memory uses a block transfer capability that has a first word (4 bytes) access time of 50 ns and an access time of 5 ns for each word thereafter. a. What is the access time when there is a cache miss? Assume that the cache waits until the line has been fetched from main memory and then re-executes for a hit. b. What is the average memory access time? c. Suppose that increasing the line size to 128 bytes increases the H to 0.97. Does this reduce the average memory access time? Solution: Given That, Single level cache with the access time = 2.5ns Block Size = 64bytes = Line Size Hit Ratio = 0.95 Word Size = 4bytes Cache Size = Cache Line Size / Word Size = 64/4 Cache Size = 16 Bytes The block transfer capacity of main memory for first word = 50 ns The block transfer capacity of main memory for remaining words = 5 ns
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help

Browse Popular Homework Q&A

Q: QS 7-6 (Algo) Allowance method for bad debts LO P2 Gomez Corporation uses the allowance method to…
Q: Determine the reference angle, in radians, associated with the given angle. Write the exact answer.…
Q: A 10 kg block is pushed at 100 m/s (horizontally) from the roof of a building that is 500 m from the…
Q: 5) Find the divergence of (√x² + y² + z 5) ki vj + zk)
Q: Problem 3. Determine whether the following polynomials are linearly independent in the vector space…
Q: For #38, use Equation 2 to expand the function in a power series with center c=0 and determine the…
Q: MISSED THIS? Watch IWE: Measuring AErxn in a Bomb Calorimeter, Read Section 7.5. You can click on…
Q: A solid sphere of ice and a solid sphere of plastic are placed at the top of an inclined plane of…
Q: Consider a silicon diode with ideality factor n = 2 and starting at room temperature. Show that the…
Q: Both the Keck Telescope and Hubble Space Telescope (HST) observe visible light. Given a typical…
Q: CREATE A FSM STATE DIAGRAM USING THE FOLLOWING INFORMATION: The system has four states, which…
Q: Problem 9. Consider a linear operator L: R³ R³ given by -1 ¹0-030 = 2 -2 -1 L = (1, 1, 1), V₂…
Q: Table attached shows the historical returns for Companies A, B and C Estimate the average return…
Q: Problem 6. Use the Gram-Schmidt process to find an orthonormal basis for the column space of the…
Q: Which of the following is the primary function of the epithelium indicated by the pointer O A.…
Q: If the galaxy NGC 6643 is 588 million light-years away, what is the lookback time to the galaxy?…
Q: Problem 1. Interpret each equation of the following system as a line in the plane. Graph the lines…
Q: Evaluate 77mod4. By Euler's or Fermat's Theorem.
Q: 3. The Office Supplies account started the year with a $4,075 balance. During the year, the company…
Q: Exercise 4-12 (Algo) Recording purchases, sales, returns, and shipping LO P1, P2 Following are the…
Q: On a particle level, what two factors contribute to an increase in pressure in a constant volume…
Q: Find the coordinates of the point P at an angle of 225 degrees on a circle of radius 2.7. Round your…