3 ms·
Threads are not the same because they are separate computation in the same address space. At some point though, permissions to disk, network, screen, input dev
by BubRoss 7y ago
Threads are not the same because they are separate computation in the same address space.
At some point though, permissions to disk, network, screen, input devices, etc. need to be an integrated part of computing for anything that runs more than one program.
Take a look at QNX though, at some point it will be reinvented and heralded as a breakthrough, 40 years after it happened the first time.
- dopylitty 7y agoThat's a good point. But as I think about it in a sense threads are also a form of isolation in that they allow you to isolate units of business code so that they can run independently and be (potentially) protected from other business code monopolizing a shared resource while not actually doing work.
- BubRoss 7y agoThreads are not a form of isolation, they have nothing to do with ' business code ' and they offer no protection at all. I'm not sure what construct you are talking about, but it is not threads.
- GauntletWizard 7y agoProcesses running on the same host are a "separate computation in the same address space" - They share a filesystem namespace. Pods running on the same kubernetes cluster are a "separate computation in the same address space" - They share a DNS namespace. Servers running on the same internet are a "separate computation in the same address space" - They share an IP namespace. These are the same abstraction at multiple levels, and that's okay, because you often do need that. The L1 and L2 cache are crystaline to inmemory and redis caches in distributed systems. Components with the same shape show up at multiple levels. This is okay. What's important is that those levels each serve a purpose, and that you reduce the abstraction to be as simple and meaningful as it can be.
- jacques_chester 7y agoA good analogy is network layers. The problems and solutions handled at the network layer resemble those at the internetwork layer, which resemble those at the transport layer, in turn similar to those at the application layer. Convergent evolution doesn't mean we should all become the same organism.
- BubRoss 7y agoProcesses exist in separate virtual memory spaces. Threads in the same process exist in the same virtual memory space. This is a fundamental principle of virtual memory. Mixing this up with a filesystem or any shared resource is completely nonsensical. Naive oversimplifications like this indicate a lack of understanding of how and why computers are architected as they are in the first place. Virtualization could be said to be an extrapolation of virtual memory and in fact does offer sub virtual memory, but to equate threads, processes, virtualization and shared resources as the same thing is grasping for simplicity that isn't there by making comparisons that aren't true.