I
I
Igor2018-05-19 16:14:42
Operating Systems
Igor, 2018-05-19 16:14:42

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

5 answer(s)
P
pfg21, 2018-05-19
@pfg21

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.

C
chromimon, 2018-05-19
@chromimon

Compression in RAM has been used since the late 20th century.

S
Stanislav Bodrov, 2018-05-28
@jenki

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 kicked
Even need some developers.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question