Answer the question
In order to leave comments, you need to log in
Do modern OSes do this? Code compression in RAM?
Noob question, but I hope someone in the know can explain.
Everyone has probably observed in daily work that now in multi-core systems RAM is all busy, and the processors are resting. And the brakes start. But I wonder if this RAM memory is occupied by compressed data (code, data)? It will not be faster to give half of the cores to processes so that they pack and unpack everything inside memory when accessing (or at least ahead of somewhere). And then I got sick of waiting for 3 minutes to switch between Excel windows, when there are a lot of them open. They contain text - a maximum of 100 MB (before compression), memory - as much as 4 GB, and switching between windows is so long and ...
You can kick with your feet :) if the question is stupid, but along the way explain why
Answer the question
In order to leave comments, you need to log in
the brakes are swapped on to the hard drive.
ram is cheap now - just add water to ram.
and the use of compressed tmpfs partitions is as old as the world.
in Linux, there is a standard kernel module ZRam for this .
gives a small gain under certain conditions.
Code compression in RAM?Code is commands that show what to do with the data. Why compress it?
Everyone has probably observed in daily work that now in multi-core systems RAM is all busy, and the processors are resting.As Tannenbaum wrote, the art of writing small and functional programs is lost, apparently forever. Therefore, large, gluttonous and mostly single-threaded programs remained.
It will not be faster to give half of the cores to processes so that they pack and unpack everything inside memory when accessing (or at least ahead of somewhere).On the one hand, it is simpler and even more correct, but on the other hand, the process is an expensive pleasure for the system (as it is considered), and interprocess communication is such a thing that you need to think about, then debug, and think again. What for? It's easier to make one big single-threaded process, which has temporary data in RAM, and everything else on disk. Iron manufacturers will only say thank you.
Can be kickedEven need some developers.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question