Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.os.linux.embedded > #269
| From | 7 <email_at_www_at_enemygadgets_dot_com@enemygadgets.com> |
|---|---|
| Subject | Re: Why does Linux need memory management units and cache? |
| Newsgroups | comp.os.linux.advocacy, comp.os.linux.embedded, uk.comp.os.linux |
| References | <exMtr.167357$JQ.57569@fx02.am4> <a1q0nqFjl3U1@mid.individual.net> <2RQtr.477893$y11.316125@fx21.am4> <op2l89-pp.ln1@lazy.lzy> |
| Followup-To | comp.os.linux.advocacy, comp.os.linux.embedded, uk.comp.os.linux |
| Message-ID | <W2Str.374899$4z7.81491@fx08.am4> (permalink) |
| Organization | virginmedia.com |
| Date | 2012-05-19 19:57 +0100 |
Cross-posted to 3 groups.
Followups directed to: comp.os.linux.advocacy, comp.os.linux.embedded, uk.comp.os.linux
Piergiorgio Sartor wrote: > On 05/19/2012 07:34 PM, 7 wrote: > [...] >> Virtual address space in a nut shell means program counter relative >> operation. So if I were careful to keep supervisory >> programs separate from user programs, and manage my address >> space of user programs with PC relative addressing, >> I won't need memory management hardware. All I need is a >> fast program that keeps the virtual memory management functions >> going because that should still be faster than setting up MMU >> and managing its operations. > > Actually, that's more or less what Amiga was doing > and many Real Time OSes. > > 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. 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. >> So a cache could be implemented in software. And if done properly > > I doubt it is possible, unless the CPU supports such > things, having, for example, some scratch pad RAM. > > 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 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. So in my opinion, hardware based caching is a waste of time. So to the best of my opinion, 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).
Back to comp.os.linux.embedded | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll 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
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