Live data from Hacker News

A friendly tour of process memory on Linux

0xkato.xyz

21–30 of 36 posts

Re: A friendly tour of process memory on Linux

#21
post #9
post #5

Instruction pipelining and this is exactly why I wish we still have the time to go back to "it is exactly as it is", think the 6502 or any architecture that does not pretend/map/table/proxy/ringaway anything. That, but a hell lot of it with fast interconnect! ... one can always dream.

The article is essentially describing virtual memory (with enhancements) which predates the 6502 by a decade or so.

IMO it's not even quite right in its description. The first picture that describes virtual memory shows all processes as occupying the same "logical" address space with the page table just mapping pages in the "logical" address space to physical addresses one-to-one. In reality (at least in all VM systems I know of) each process has its own independent virtual address space.

Re: A friendly tour of process memory on Linux

#22
post #8
post #7

Earlier quoted context omitted.

I'm curious how this dream is superior to where we are? Yes, things are more complex. But it isn't like this complexity didn't buy us anything. Quite the contrary.

> ...buy us anything. Totally depends on who "us" and isn't. What problem is being solved etc. In the aggregate clearly the trade off has been beneficial to the most people. If what you want to do got traded, well you can still dream.

Right, but that was kind of my question? What is better about not having a lot of these things?

That is, phrasing it as a dream makes it sound like you imagine it would be better somehow. What would be better?

Re: A friendly tour of process memory on Linux

#23
post #22
post #8

Earlier quoted context omitted.

> ...buy us anything. Totally depends on who "us" and isn't. What problem is being solved etc. In the aggregate clearly the trade off has been beneficial to the most people. If what you want to do got traded, well you can still dream.

Right, but that was kind of my question? What is better about not having a lot of these things? That is, phrasing it as a dream makes it sound like you imagine it would be better somehow. What would be better?

Things would be simpler, more predictable and tractable.

For example, real-time guarantees (hard time constraints on how long a particular type of event will take to process) would be easier to provide.

Re: A friendly tour of process memory on Linux

#24
post #23
post #22

Earlier quoted context omitted.

Right, but that was kind of my question? What is better about not having a lot of these things? That is, phrasing it as a dream makes it sound like you imagine it would be better somehow. What would be better?

Things would be simpler, more predictable and tractable. For example, real-time guarantees (hard time constraints on how long a particular type of event will take to process) would be easier to provide.

But why do we think that? The complexity would almost certainly still exist. Would just now be up a layer. With no guarantees that you could hit the same performance characteristics that we are able to hit today.

Put another way, if that would truly be a better place, what is stopping people from building it today?

Re: A friendly tour of process memory on Linux

#25
post #24
post #23

Earlier quoted context omitted.

Things would be simpler, more predictable and tractable. For example, real-time guarantees (hard time constraints on how long a particular type of event will take to process) would be easier to provide.

But why do we think that? The complexity would almost certainly still exist. Would just now be up a layer. With no guarantees that you could hit the same performance characteristics that we are able to hit today. Put another way, if that would truly be a better place, what is stopping people from building it today?

Performance wouldn’t be the same, and that’s why nobody is manufacturing it. The industry prefers living with higher complexity when it yields better performance. That doesn’t mean that some people like in this thread wouldn’t prefer if things were more simple, even at the price of significantly lower performance.

> The complexity would almost certainly still exist.

That doesn’t follow. A lot of the complexity is purely to achieve the performance we have.

Re: A friendly tour of process memory on Linux

#26
post #25
post #24

Earlier quoted context omitted.

But why do we think that? The complexity would almost certainly still exist. Would just now be up a layer. With no guarantees that you could hit the same performance characteristics that we are able to hit today. Put another way, if that would truly be a better place, what is stopping people from building it today?

Performance wouldn’t be the same, and that’s why nobody is manufacturing it. The industry prefers living with higher complexity when it yields better performance. That doesn’t mean that some people like in this thread wouldn’t prefer if things were more simple, even at the price of significantly lower performance. > The complexity would almost certainly still exist. That doesn’t follow. A lot of the complexity is pur…

I'm used to people arguing for simpler setups because the belief is that they could make them more performant. This was specifically the push for RISC back in the day, no?

To that end, I was assuming the idea would be that we think we could have faster systems if we didn't have this stuff. If that is not the assumption, I'm curious what the appeal is?

Re: A friendly tour of process memory on Linux

#27
post #26
post #25

Earlier quoted context omitted.

Performance wouldn’t be the same, and that’s why nobody is manufacturing it. The industry prefers living with higher complexity when it yields better performance. That doesn’t mean that some people like in this thread wouldn’t prefer if things were more simple, even at the price of significantly lower performance. > The complexity would almost certainly still exist. That doesn’t follow. A lot of the complexity is pur…

I'm used to people arguing for simpler setups because the belief is that they could make them more performant. This was specifically the push for RISC back in the day, no? To that end, I was assuming the idea would be that we think we could have faster systems if we didn't have this stuff. If that is not the assumption, I'm curious what the appeal is?

That’s certainly not the assumption here. The appeal is, as I said, that the systems would be more predictable and tractable, instead of being a tarpit of complexity. It would be easier to reason about them, and about their runtime characteristics. Side-channel attacks wouldn’t be a thing, or at least not as much. Nowadays it’s rather difficult to reason about the runtime characteristics of code on modern CPUs, about what exactly will be going on behind the scenes. More often than not, you have to resort to testing how specific scenarios will behave, rather than being able to predict the general case.

Re: A friendly tour of process memory on Linux

#28
post #27
post #26

Earlier quoted context omitted.

I'm used to people arguing for simpler setups because the belief is that they could make them more performant. This was specifically the push for RISC back in the day, no? To that end, I was assuming the idea would be that we think we could have faster systems if we didn't have this stuff. If that is not the assumption, I'm curious what the appeal is?

That’s certainly not the assumption here. The appeal is, as I said, that the systems would be more predictable and tractable, instead of being a tarpit of complexity. It would be easier to reason about them, and about their runtime characteristics. Side-channel attacks wouldn’t be a thing, or at least not as much. Nowadays it’s rather difficult to reason about the runtime characteristics of code on modern CPUs, about…

I guess I don't know that I understand why you would dream of this, though? Just go out and program on some simpler systems? Retro computing makes the rounds a lot and is perfectly doable.

Re: A friendly tour of process memory on Linux

#29
post #22
post #8

Earlier quoted context omitted.

> ...buy us anything. Totally depends on who "us" and isn't. What problem is being solved etc. In the aggregate clearly the trade off has been beneficial to the most people. If what you want to do got traded, well you can still dream.

Right, but that was kind of my question? What is better about not having a lot of these things? That is, phrasing it as a dream makes it sound like you imagine it would be better somehow. What would be better?

Think about using a modern x86-64 cpu core to run one process with no operating system. Know exactly what is in cache memory. Know exactly what deadlines you can meet and guarantee that.

It's quite a different thing to running a general purpose OS to multiplex each core with multiple processes and a hardware walked page table, TLB etc.

Obviously you know what you prefer for your laptop.

As we get more and more cores perhaps the system designs that have evolved may head back toward that simplicity somewhat? Anything above %x cpu usage gets its own isolated, un-interrupted core(s)? Uses low cost IPC? Hard to speculate with any real confidence.

Re: A friendly tour of process memory on Linux

#30
post #29
post #22

Earlier quoted context omitted.

Right, but that was kind of my question? What is better about not having a lot of these things? That is, phrasing it as a dream makes it sound like you imagine it would be better somehow. What would be better?

Think about using a modern x86-64 cpu core to run one process with no operating system. Know exactly what is in cache memory. Know exactly what deadlines you can meet and guarantee that. It's quite a different thing to running a general purpose OS to multiplex each core with multiple processes and a hardware walked page table, TLB etc. Obviously you know what you prefer for your laptop. As we get more and more cores…

I just don't know that I see it running any better for the vast majority of processes that I could imagine running on it. Was literally just transcoding some video, playing a podcast, and browsing the web. Would this be any better?

I think that is largely my qualm with the dream. The only way this really works is if we had never gone with preemptive multitasking, it seems? And that just doesn't seem like a win.

You do have me curious to know if things really do automatically pin to a cpu if it is above a threshold. I know that was talked of some, did we actually start doing that?

Post reply on HN