Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.os.linux.advocacy > #108013

Re: Why does Linux need memory management units and cache?

Date 2012-05-19 21:17 +0200
From Piergiorgio Sartor <piergiorgio.sartor.this.should.not.be.used@nexgo.REMOVETHIS.de>
Newsgroups comp.os.linux.advocacy, comp.os.linux.embedded, uk.comp.os.linux
Subject Re: Why does Linux need memory management units and cache?
References <exMtr.167357$JQ.57569@fx02.am4> <a1q0nqFjl3U1@mid.individual.net> <2RQtr.477893$y11.316125@fx21.am4> <op2l89-pp.ln1@lazy.lzy> <W2Str.374899$4z7.81491@fx08.am4>
Message-ID <e78l89-pp.ln1@lazy.lzy> (permalink)
Organization Arcor

Cross-posted to 3 groups.

Show all headers | View raw


On 05/19/2012 08:57 PM, 7 wrote:
[...]
>> It is faster, also faster to crash, since programs
>> could, -intentionally or unintentionally-, address
>> memory which they should not.
> 
> That is trivial to address.
> The crashing can be prevented if PC relative
> addressing had bound checking hardware that executes trap
> whenever address range is out of bounds.

Which means you need HW support, which means
you need a MMU, giving you the luxury to not
care of the problem in the software.

> So MMU is not needed if Linux could manage its
> memory with fast software, and if CPUs came equipped
> with bound checking for PC relative addressing.

Well, if... What is available is MMU, should
someone consider to inform intel, or others,
about some possible HW improvement?

[...]
>> Since cache is cache, i.e. fast but small memory, it
>> has to be an hardware component.
>> How this hardware is handled, is CPU dependent.
> 
> A cache could be more effective if smart
> software precisely keeps tabs on what
> the DMA controller is doing; and programs that

DMA controller is not enough, what is needed
is a fast memory too.

In any case, HW support is needed.
Likely it is possible to improve CPUs architecture,
but that's not a software problem.

> are running have fine grained messaging that lets
> the cache know what is happening with them.
> That way cache fetching could be aborted and flushed
> more rapidly than letting the cache decide what
> to cache. Aborting a cache operation can save tons
> of time on a CPU because typically it can take
> hundreds of nanoseconds to microseconds
> to set up another fetch from somewhere else,
> whilst during that time, 100+ instructions
> could have executed making an intelligent
> decision as to what best to cache.

It seems you're quite optimistic in your description,
have you real tried to to calculate the numbers?
What you depict might work under some circumstances,
namely: a "smart" DMA is available, some RAM as fast
as a cache, quite a lot of data need to be transferred.
The last condition is due to the fact that DMA takes
time too, in order to start or stop operations.

> with these ultra modern CPUs that are running at
> gigahertz speeds, the most important advancements
> for an operating system and speed is better software
> for software implementation of MMU and better software for caching
> and to remove the hardware MMU and hardware cache
> (and in its place put in more DMA controllers and local RAM).

Yep, you might want to look at Cell architecture,
you'll find a lot of that.

In any case, as mentioned above, this has nothing to
do with software, it a hardware architecture issue.

bye,

-- 

piergiorgio

Back to comp.os.linux.advocacy | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Why does Linux need memory management units and cache? 7 <email_at_www_at_enemygadgets_dot_com@enemygadgets.com> - 2012-05-19 13:40 +0100
  Why does Linux need memory management units and cache? Kulin <remailer@reece.net.au> - 2012-05-19 14:26 +0000
  Re: Why does Linux need memory management units and cache? Niklas Holsti <niklas.holsti@tidorum.invalid> - 2012-05-19 19:40 +0300
    Re: Why does Linux need memory management units and cache? 7 <email_at_www_at_enemygadgets_dot_com@enemygadgets.com> - 2012-05-19 18:34 +0100
      Re: Why does Linux need memory management units and cache? Piergiorgio Sartor <piergiorgio.sartor.this.should.not.be.used@nexgo.REMOVETHIS.de> - 2012-05-19 19:44 +0200
        Re: Why does Linux need memory management units and cache? 7 <email_at_www_at_enemygadgets_dot_com@enemygadgets.com> - 2012-05-19 19:57 +0100
          Re: Why does Linux need memory management units and cache? Piergiorgio Sartor <piergiorgio.sartor.this.should.not.be.used@nexgo.REMOVETHIS.de> - 2012-05-19 21:17 +0200
            Re: Why does Linux need memory management units and cache? 7 <email_at_www_at_enemygadgets_dot_com@enemygadgets.com> - 2012-05-20 22:53 +0100
      Re: Why does Linux need memory management units and cache? Grant Edwards <invalid@invalid.invalid> - 2012-05-20 14:42 +0000
        Re: Why does Linux need memory management units and cache? Hadron<hadronquark@gmail.com> - 2012-05-20 16:48 +0200
          Re: Why does Linux need memory management units and cache? Nix <nix-razor-pit@esperi.org.uk> - 2012-05-20 22:19 +0100
            Re: Why does Linux need memory management units and cache? 7 <email_at_www_at_enemygadgets_dot_com@enemygadgets.com> - 2012-05-20 22:55 +0100
              Re: Why does Linux need memory management units and cache? Nix <nix-razor-pit@esperi.org.uk> - 2012-05-21 16:24 +0100
                Re: Why does Linux need memory management units and cache? chrisv <chrisv@nospam.invalid> - 2012-05-21 10:44 -0500
                Re: Why does Linux need memory management units and cache? GreyCloud <mist@cumulus.com> - 2012-05-21 10:51 -0600
                Re: Why does Linux need memory management units and cache? GreyCloud <mist@cumulus.com> - 2012-05-21 10:51 -0600
                Re: Why does Linux need memory management units and cache? Foster <frankfoster50@yahoo.com> - 2012-05-21 12:53 -0400

csiph-web