Question

What is the time complexity to identify required block in cache if direct mapping scheme is...

What is the time complexity to identify required block in cache if direct mapping scheme is used while CPU generates n bit main memory address? What is the time complexity of getting a required cache block in associative mapping?

Homework Answers

Answer #1

In direct mapped cache, a particular address will belong to only one particular cache block. So to identify if a particular memory block is in cache or not, we need to check only one cache block and check it's tag bit.

So the time complexity is O(1).

In an associative mapping, a memory block can belong to any block of cache. Thus to check if a block is present in cache or not, we have to check entire cache blocks. All the block have to be checked with the tag bits of given memory address.

So time complexity is O(# of cache block)

If you have any questions comment down and please? upvote thanks...

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
Assume a byte-addressable memory has 64K bytes. Blocks are 8 bytes in length and the cache...
Assume a byte-addressable memory has 64K bytes. Blocks are 8 bytes in length and the cache consists of 4K bytes. Show the format for a main memory address assuming a 4-way set associative cache mapping scheme. Include the field names as well as their sizes. A direct-mapped cache consists of 8 blocks. Byte-addressable main memory contains 4K blocks of 8 bytes each. Access time for the cache is 22ns, and the time required to fill a cache slot from main...
Suppose a computer using direct mapped cache has 224 bytes of byte-addressable main memory, and a...
Suppose a computer using direct mapped cache has 224 bytes of byte-addressable main memory, and a cache of 128 blocks, where each cache block contains 8 bytes. For four-way set associative cache, to which block of cache the address 0x1895BA maps? Group of answer choices Block 70 Block 16 Block 23 Not enough information
14. For a direct-mapped cache with a 32-bit address and 32-bit words, the following address bits...
14. For a direct-mapped cache with a 32-bit address and 32-bit words, the following address bits are used to access the cache. Tag Index Offset 31-16 15-5 4-0 What is the cache block size (in words)? How many blocks does the cache have?
In a hypothetical system with 1024 bytes of main memory, 128 bytes of cache, blocks of...
In a hypothetical system with 1024 bytes of main memory, 128 bytes of cache, blocks of 32-byte size, with direct-map (S = 1) placement policy and LRU replacement policy, answer each of the following questions: Determine the address fields for index, tag and block offset in the memory address. How many sets are there in the cache? How many blocks in the main memory are mapped to the same set of blocks in cache? If associative (parallel) comparison is to...
In a hypothetical system with 1024 bytes of main memory, 128 bytes of cache, blocks of...
In a hypothetical system with 1024 bytes of main memory, 128 bytes of cache, blocks of 32-byte size, with direct-map (S = 2) placement policy and LRU replacement policy, answer each of the following questions: Determine the address fields for index, tag and block offset in the memory address. How many sets are there in the cache? How many blocks in the main memory are mapped to the same set of blocks in cache? If associative (parallel) comparison is to...
How to measure the time complexity of an algorithm? Identify an important operation in the algorithm...
How to measure the time complexity of an algorithm? Identify an important operation in the algorithm that is executed most frequently. Express the number of times it is executed as a function of N. Convert this expression into the Big-O notation. A. For each of the three fragments of code, what is its worst-case time complexity, in the form "O(…)". (Use the given solution to the first problem as a model)                 //----------------- This is a sample problem – solved ------...
Given a Class B network and a number of subnets required, complete the table to identify...
Given a Class B network and a number of subnets required, complete the table to identify the number of bits to borrow from the host field for the subnet field and the maximum number of host addresses available per subnet. Number of Subnets Required Number of Bits to Borrow for the Subnet Field Maximum Number of Hosts per Subnet Subnet Mask in Binary and Decimal Representations 5 3    23 = 8 Class B has 16 host bits by definition. If...
Question -Organizational change goes beyond promotions and the threat of layoffs. What ways other than those...
Question -Organizational change goes beyond promotions and the threat of layoffs. What ways other than those discussed in the case would you use to entice people to embrace proposed changes? Provide several suggestions and justify their rationale. CASE STUDY- Blue Cross and Blue Shield, and Others: Understanding the Science behind Change Kevin Sparks has been trying to get his staff to change the way it monitors and supports the data center for the past year, but he hasn’t been getting...
Assignment: What are the main arguments in the article? Please answer within 5 hours. It is...
Assignment: What are the main arguments in the article? Please answer within 5 hours. It is extremely urgent!!!!!!!!!!!!!!!!!!!!!!!! --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- BIOETHICS. Bioethics as a field is relatively new, emerging only in the late 1960s, though many of the questions it addresses are as old as medicine itself. When Hippocrates wrote his now famous dictum Primum non nocere (First, do no harm), he was grappling with one of the core issues still facing human medicine, namely, the role and duty of the...
The Business Case for Agility “The battle is not always to the strongest, nor the race...
The Business Case for Agility “The battle is not always to the strongest, nor the race to the swiftest, but that’s the way to bet ’em!”  —C. Morgan Cofer In This Chapter This chapter discusses the business case for Agility, presenting six benefits for teams and the enterprise. It also describes a financial model that shows why incremental development works. Takeaways Agility is not just about the team. There are product-management, project-management, and technical issues beyond the team’s control. Lean-Agile provides...