Podcast #128: We chat with Kent C Dodds about why he loves React and discuss what life was like in the dark days before Git. Listen now.
10

Sorry for the late reply, but I've just found the question (questions, indeed). I am studying concurrency as well and I'll try to share some ideas with you. First, let's start with sequential consistency. A model has this property if operations appear to take effect in program order. In other words, the order in which lines of code are executed is the one ...


8

Perhaps I can shed some light on associativity. These caches aren't just open blocks of memory, so don't think of them as some kind of generic container. Each block of memory has a real address (whether this is physical or virtual doesn't matter, just assume it is a fixed address). At each level of cache this memory can only be cached at very specific ...


7

As you pointed out, coherence is a property of an individual memory location while consistency refers to the order of accesses to all memory locations. Sequential consistency is a strictly stronger property than coherence. That is: every system that is sequentially consistent is also coherent at every memory location. The opposite is not true, a memory ...


4

First there is the answer already given by André Souza Lemos. The data need not be destroyed. It is usually sufficient to mark the corresponding space as unused in some table, so that the system will no longer try to read it: it considers that there is nothing stored there. But the data is often still there, often fairly easy to find, even when some key ...


4

Deleting is not necessarily destroying data. It can be done (much faster, indeed) by making it inaccessible. You can do it by erasing critical information from the data structures that are used to index the data you want to delete. How exactly this is done depends on how the storage device is organized (formatted).


4

This trace is possible, in two separate threads T1 and T2. $state$ is $(x,y)$. T1: ... $state=(0, 4)$ T1: x = x + 1; y = y - 1 $~~state=(1, 3)$ T1: x = x + 1; y = y - 1 $~~state=(2, 2)$ T2: x == y evaluates to true, pass and then x = 0; $~~state=(0, 2)$ T1: x != y evaluates to true, x = x + 1; y = y - 1 $~~state=(1, 1)$ T2: y = 2 $~~state=(1, 2)$ T1: x != y ...


4

The fork primitive makes a copy of the process. From within the processes, the parent and the child are almost identical; the few differences are the return value of the fork primitive and a few characteristics such as the process ID. Copy-on-write is an implementation optimization. It isn't visible from inside the process. You'd need to look inside the ...


3

You do not know anything about the behavior of the register if read calls overlap. Perhaps the register is a sensitive electrical component and overlapping reads will blow it up? Perhaps reading (counter-intuitively) requires changing the state of the register, for instance writing the target memory location which the value must be read in to? If two reads ...


1

There is a simple solution. Instead of storing a hashmap of all positions, store the set of only the positions that are currently alive. Live cells are included in the set; dead cells are not. When you want to know whether a particular cell is alive or not, look up that position in the set; if it is found, then the cell is alive, otherwise the cell is ...


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