Re: RAM-CPU Singularity



yaoziyuan@xxxxxxxxx wrote:
That is to say, software applications should sometimes treat the RAM
and CPU resources as one single computing resource, using an idle
resource to compensate the urgent needs of another kind of resource.

I may be blind about it but there's no way of doing this and that's
because processors are degrees of magnetude faster than cache, which
are degrees of magnetude faster than main memory which are degrees of
magnetude faster than magnetic disks. The cost of each part is
exponencial as well.

That's why the original thinkers came up with the cache stuff: disk
caches to RAM which caches to proc cache which caches to registers.
Treating L1/L2 Cache as same as DDR chips would be silly.


Based on space-time tradeoff principles in algorithm design theory, we
can redesign object libraries like STL to be able to adapt to any
extremely unbalanced space-time requirements (e.g. a very fast CPU but
very limited RAM, or a very slow CPU but very rich RAM) and able to
re-adapt to a new requirement on-the-fly. Application frameworks like
MFC, VCL or GTK should also be redesigned to serve this purpose. But
the details of resource management should be transparent to the end
developer.

Space and Time are not the same thing, as you might imagine. They're in
the same four-dimensional reality and are treated by the same set of
rules but still are very different things. You can't just go backwards
in time because of the thermodinamic, it's called "the arrow of time"
and was already proved that even if the universe start to shrink and
came back what it once was the time would still go forward.

It's the same with processors and memory. Processors can't store data
(special register inside it can) and memory can't process data! Even if
you come up with a very smart algorithm to manage poor memory set ups
(what would be great) it seems impossible to me the treat them as the
same phisical reality.


There are already successful (maybe) examples of transparent tradeoffs
between different kinds of computing resources, such as virtual memory.

I guess you called "virtual memory" the swap space on disk, and if it's
that you are wrong about two things: first, swap is not a good
replacement for memory since disks are degrees of magnetude slower than
chips and second, this is not intended to act as a real "virtual
memory" as you stated exactly because of the first problem.

Swap is used as a final resource, when all memory is full and the
machine think (sometimes wrongly) that you'll just run one more little
program and quit, and so it puts some unused memory on disk before
giving you more memory.

Most of the time when you enter the swap area you're doomed. Your
machine will crash sooner or later if you don't stop using it and let
the system rearange it's memory.

well, that are my 2 cents, but as we're on "comp.theory" you're
strongly encourage to disagere! ;)

cheers,
--rengolin

.



Relevant Pages

  • Re: What can I check to fix system performance?
    ... it seems you have plenty of memory available: ... copies of files you have read of written lately, in a cache, in case ... processes per CPU, or 40 in all. ... Consider the disk structure. ...
    (comp.os.linux.setup)
  • Re: Caching control
    ... |> | invalidate/unmap them in order to discard the data from memory. ... |> writing out to disk. ... | easy to discard as clean disk cache. ... stating that a specific amount of RAM can be used only for I/O ...
    (comp.os.linux.development.system)
  • Re: Scheduler: Process priority fed back to parent?
    ... > interactivity cache could estimate interactivity over a period of hours ... Then you don't even have to write it to the filesystem. ... For those of us with enough memory or a large variety of programs, ... That way the file is already in disk cache or on its way when the ...
    (Linux-Kernel)
  • Re: FreeBSD and poor ata performance
    ... Linux doesn't really have raw disk devices. ... All disk I/O is through the disk cache, ... performance (on a system with sufficient memory to hold all of the data ... sys 0m12.477s ...
    (freebsd-questions)
  • Re: Named Shared "memory" or "file"?
    ... And second process can show "Message from first ... Second process get handle to first process' physical "memory" and get ... another file) on the disk or "same memory"? ... the data will be in cache. ...
    (microsoft.public.win32.programmer.kernel)