Hot answers tagged

5

"In-order" processors only issue instructions in order. Completion is out-of-order even on most processors that are called "in-order". "in-order" just means: if the processor needs to stall the issuing of the next instruction because of a RAW, WAW, or WAR dependence, it can't issue any other instruction during the stall. In ...


5

Computer hardware is fundamentally parallel. Even a modern single CPU core is pipelined, meaning that at the same instant in time, one physical part of the CPU is initiating a fetch of an instruction, another is decoding a slightly earlier fetched instruction, another is calculating the new result of a slightly earlier decoded instruction, and another is ...


3

It's not guaranteed; it may depend on the data. Let's say an 8-way associative cache can hold 8 items at position 512k + j for each fixed j, and a 4-way associative cache can hold 4 items at position 1024k + j. My algorithm accesses locations 1024k + 512 + j for just four values k all over again. And locations 1024k + j for lots of values k, so there is ...


2

An n-way set associative cache is a cache that is chopped up in sections called sets. And each set can hold n-blocks. A cache-address can be broken up up in 3 parts. the offset within the block the index that identifies the set the tag that identifies the block in the set. When a request comes in, the index is calculated to identify the set. Then the tags ...


2

No, increasing the memory speed won't help solve the Von Neumann architecture bottleneck. The reason is as memory size is increased the time required to access the memory contents increases. So no matter how fast the memory is, if it is large it will be slower. So faster, smaller memories called caches are used to provide the illusion of a large, fast memory ...


2

I failed to understand @gnasher729 explanation, so this is my one demonstrating the same situation. Let's consider just one line of 8-way cache, and compare it to two corresponding lines (A and B) of 4-way cache. Imagine the situation when we access 4 different addresses of line A, then 5 addresses of line B, repeating that in loop. So, hit:miss ratio for 4-...


1

A direct-mapped cache is another name for a one-way set associative cache. Calculating number of bits in address space Number of bits in address space = log2(Memory size) Bits in (Tag + Index + offset) = Number of bits in address space In order to know the number of bits in Tag field, we would need to figure out the number of bits in Index and Offset ...


1

I am going to talk about the cache - related questions: Block size is $$32 \text{words} = 2^5$$ . That, means that you need, 5 bits for offset. $$\#\text{blocks}=\frac{2^{19}}{2^5}=2^{14}$$, so you need 14 bits for the index ( to indentify which block in cache is going to represent your wanted memory adresss ) For a 32 - bit adress, tag is the rest : $$32 - ...


1

Disclaimer: It's been a while since I last read that book. It was an edition that pre-dated HBM. So I can't really refer to the book to find out what it's saying. The "level" of a cache refers to how many steps removed it is from the CPU's load/store hardware. It means nothing beyond that. You can't just say "L3" and assume that it refers to the same ...


1

Your program will work exactly as if there was no cache, and as if each single memory operation was completed before the next one is started. Typical implementations will first make sure that the complete data for a cache line is stored in the cache. So for example writing four bytes may first read the complete 64 byte line from memory. With a line of ...


1

The cached data might be needed again in the future and keeping it doesn't cause any particular performance problem, so you may as well keep it until you need the space for something else.


1

You first need to establish the access speed of the cache, depending on the cache size (usually larger cache -> slower speed, because of physics). You also need to determine the energy consumption of a larger cache, which will lead to increased heat, which will lead to lower clock speed (again, because of physics). Then you need to find the cost of a larger ...


1

For anyone visiting this thread in the future, FIFO can have less page faults in some scenarios. In this one ( <2, 6, 5, 7, ..., ..., ...> ), it can be completed with 2, 8, 6. The access of 2 means that the least recently used page is 6, but the first page in is still 2. The access of 8 replaces 2 in FIFO, but 6 in LRU. The access of 6, therefore, is ...


Only top voted, non community-wiki answers of a minimum length are eligible