4 ms·
> No, you can use threads. I thought that was assumed in the sentence I wrote, as threads are even harder to deal with properly due to their shared memory spac
by PeterGriffin 12y ago
> No, you can use threads.
I thought that was assumed in the sentence I wrote, as threads are even harder to deal with properly due to their shared memory space. But they still do context switch, have cache misses, require complex (way more complex) synchronization and so on.
If you can get away with separate processes, you're way better off. Threads are a last resort and come with a "use with caution" label.
> That's a really bad comparison, and isn't applicable here at all. Computers are very different from humans or animals, both in how they function and in how they're "programmed". Well, at least it wasn't a car analogy.
No, I didn't just use a random analogy. How much do you know about our brain works anyway?
Did you know our memory types are stacked like CPU caches, RAM and disk, going from fast short-term to slow long-term memory? Interesting, right? We are literally having "cache misses" when context switching, just like our computer brothers.
And as we keep evolving computer designs, they keep creeping closer and closer to how our brain works and the tradeoffs are startlingly similar. I was very deliberate in my comparison. Think about it like dolphins adopting a quite similar body design and locomotion as fish, despite their completely different origins.
Next step is the always-around-the-corner clockless CPU design. It'll come, eventually (either that, or more likely we'll have hundreds of tiny, simple, specialized, locally clocked cores with some memory on-board).
- adwn 12y ago> I thought that was assumed in the sentence I wrote You might have assumed it, but your post didn't mention or even imply it. > Computers keep creeping closer and closer to how our brain works and the tradeoffs are startlingly similar. This definitely needs an explanation. In what way are computers and brains "creeping closer and closer"? > Think about it like dolphins adopting a quite similar body design and locomotion as fish, despite their completely different origins. This is another bad analogy. CPUs and human brains do not live in the same environment, and CPUs are not subjected to evolution (they could be considered instances of Intelligent Design, though ;-) ).
- deleted 12y ago[deleted]
- PeterGriffin 12y agoSeriously, you're going to nitpick the way I used the word "evolution" now? I'm done.
- lmm 12y agoWe have things like caches, true. But I'm not aware of neurology having identified anything remotely resembling multiple cores or hyperthreading in the human or animal brain. And saying that "there's a balance to be struck" in human multitasking manages to be both trite and wrong; the evidence is not that some people multitask too much and some people multitask too little. Multitasking makes you more stressed and less effective; the overwhelming majority of people should be trying to reduce or eliminate it. Which says very little about how much multitasking our CPUs should be doing.
- pdonis 12y agoBut I'm not aware of neurology having identified anything remotely resembling multiple cores or hyperthreading in the human or animal brain. Um, you do realize that the human brain has ten to a hundred billion neurons that all run in parallel, right?
- lmm 12y agoYou mean like all the transistors in a single-core processor run in parallel?
- pdonis 12y agoTransistors are much less complex than neurons; it takes multiple transistors even to implement a single logic gate, and the input-output function for a single neuron is much more complex than a single logic gate. (Some neuroscientists might say that processor cores are less complex than neurons, though I'm not sure I would go that far. I would only say that it would take a small number of neurons--much smaller than the number in the brain--to be equivalent to a processor core.)
- GrinningFool 12y ago"But I'm not aware of neurology having identified anything remotely resembling multiple cores or hyperthreading in the human or animal brain." And yet here you sit, typing and breathing and seeing and thinking about what you're having for dinner tonight while your digestive system continues to work on lunch and your heart continues to beat.