Episode #125 of the Stack Overflow podcast is here. We talk Tilde Club and mechanical keyboards. Listen now
4

"32-bit" describes the size of many of the units of data that the processor can use. In this context, it refers to the size of memory addresses. A 32-bit address can address $2^{32}$ distinct objects; in a byte addressable system, that means it can address $2^{32}$ distinct bytes. We don't give addresses to individual bits in memory, but rather groups of ...


3

Go to Agner manuals page and download them all, you will find tons of interesting info there. In particular, microarchitecture.pdf says There is a false dependence between memory addresses with the same set and offset, i.e. with a distance that is a multiple of 4 Kbytes: ;Example 9.6. Sandy bridge false memory dependence mov [rsi],eax mov ebx,[rsi+1000H]...


2

A buffer is usually used only as temporary storage while something is being transmitted or read. For instance, you might be reading data from a slow-response external storage medium (e.g., a CD) and processing it continuously. In this setting, the first process reads chunks of data from the medium and writes it to the buffer on demand, while the latter reads ...


2

CPU registers are often counted as part of primary memory (since they are directly accessed by the CPU - see Wikipedia) and are often volatile, so it seems likely that the expected answer is (1). However, this is one of those annoyingly ambiguous questions which depend on the student memorising a very specific set of definitions and ignoring any exceptions.


2

No, the author is wrong. I have used 32 bit processors that could address 64 GB of RAM. Memory is restricted by the number of address lines, multiplied by the number of bytes addressed by each individual value of address lines. Address space of one application was limited to 4GB, but you could have a dozen applications running at the same time, each ...


2

So why do we still use this architecture in the majority of modern computing? The assumption itself, first clause: Modern Computer <= Von Neumann Firstly, do note that the Von Neumann architecture is not used exclusively: almost any current "Von Neumann" machine except for very small microcontrollers (which are occasionally Harvard machines) features ...


2

What you are looking for is named "address decoding". If a processor can address 64kB, its address bus is something like A[15:0]. If you use a 1kB memory chip, its addresses will be A[9:0]. There are several options : Either you don't connect the bits A[15:10] of the processor. The memory will be mirrored at several "places" in the CPU address map, in ...


2

You can look at how one of the existing DRAM simulators work. Consider, for example, Ramulator, which is a popular academic DRAM simulator. Ramulator Models main memory as a tree of nodes, where the root node represents a memory channel and lower nodes represent ranks, bank groups (supported in DDR4), banks, rows, and columns. For the DRR4 and DRR3 protocols,...


2

Buses usually connect the central processing unit (CPU) with peripheral devices, like memory or other Input/Output devices. To activate a memory you need to do two things: - specify the cell in the memory you want to write to / read from (that would be the address) - give the data to write to the memory, or take the data from the memory (this information ...


2

Buffer is a concept. It's a structure used to hold data to keep it "closer" while you're processing it. Like buffering a YouTube video. Many types of memories are used as buffers. RAM is certainly great for holding buffers, but for large data you can also buffer data on a hard drive, or an SSD. Buffers are mainly used to hold data that is costly to read ...


1

SSD drives are often used as buffers. You wouldn’t call an SSD drive RAM, would you? RAM is Random Access Memory. A buffer is a data structure used to optimise the flow of data. You make a category mistake. You compare things that cannot be compared. It’s like asking why your nose isn’t called Usain Bolt when they are both running.


1

Yes. You can have a smaller memory chip. Trying to read or write an address beyond that range might cause unpredictable behavior or meaningless results, so you'd want to avoid doing that.


1

What if the STM instruction were executed speculatively, and an instruction ahead of it faults? Or it's behind a mispredicted branch? I can't speak for all ARM variants (things have probably changed over time), but the semantics of any instruction must be that if the instruction causes a fault, it's as if the instruction didn't happen. What modern ARM ...


1

The MMIO is read into instruction cache, and the code executes as normal. The instruction cache assumes that the contents of memory underneath it do not change unless the cache is explicitly flushed. Not only does this work, it's common practice to execute code directly from flash devices in very small embedded applications.


1

The correct answer is: greater or equal to K/D, depending on the fact that K can be a multiple of D or not. So, the answer is actually c), which differs from the other three answers. Note that if there were an answer “ceil(K/D)”, that would have been the correct answer.


1

As a general rule, variables are never stored on the hard disk (there are exceptions but let's not get into that here). The CPU can perform basic operations (arithmetic, comparisons, bit manipulations) in a number of ways, using registers, cache, stack, or general RAM. Registers are fastest but there aren't many of them. Whether a programming language uses ...


1

Finding the right track is relatively easy. There is a motor which can be moved a precise distance. Then the head can measure magnetism to the right and the left and use this to move to the precise centre of the track. The sectors all have a header. The read head passes sectors at high speed. The start of the header has a distinct pattern that cannot be ...


1

"Why is that?" Because divisor <<= 4 means original_divisor * (2**4), where I use original_divisor to denote the value of divisor when you began computing div(dividend, divisor). Every time you do divisor >>= 1, you divide that divisor by 2. So you will get original_divisor * (2**3), original_divisor * (2**2), original_divisor * (2**1), ...


1

The straightforward manner of indexing and tagging a cache is for the index to be the address (in blocks, i.e., removing the block offset) modulo the way size (in blocks) and for the tag to be the quotient of these numbers. The computational cost of exact division for non-powers-of-two makes this less practical for first level caches, but Mersenne number (2n-...


1

Performance comparisons are not hardware agnostic because performance does not scale proportionately for all applications across all computers. Even if the relative performance of a particular program is believed to be independent of hardware reasonably likely to be used for the problem the program addresses, providing this information can help when ...


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