[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: OT: down with memory protection!



On Thu, 2004-12-02 at 15:38 -0600, Kirk Strauser wrote:
> On Thursday 02 December 2004 09:30, Sam Watkins wrote:
> 
> > Current mainstream OSes like Linux implement memory protection primarily
> > to prevent buggy or malicious processes trampling on each-others memory
> > and memory-mapped devices, or spying on other processes.
> 
> No, they don't.  Memory protection is generally a free side effect of 
> virtual memory (not to be confused with "swap").  That is, virtual memory 
> is the goal, and memory protection is a good thing that comes along with 
> it.

I'm pretty sure that they are distinct features, i.e., it's possible
to do mem prot w/o VM , and vice versa.

But since h/w and OS engineers have understood since the early 
1970's that both protection and VM are Good Things, an implemen-
tation that saves transistors (especially Way Back When) and gives
both mem prot and VM at the same time is A Big Win.

> > All processes could run on a single address space, there would be no need
> > for context-switching, pipes could be implemented as shared buffers, and
> > processes could send messages to each other without needing to copy
> > memory.
> 
> Congratulations - you've just invented shared memory (see shm*(2) for 
> details on the Linux syscalls that implement it).
> 
> > I think people don't normally use more than 4GB of VM on 32-bit
> > computers, at least they won't now that 64 bit CPUs are taking off,
> 
> Not even close to correct, actually.
> 
> > Programs could call "yield" every now and again,
> 
> Get a pre-OS X Macintosh and see how well you like it.  Seriously, it's 
> called cooperative multitasking, and it's generally not well-regarded.
> 
> > and the compiler and programmer could be required to prove that the code
> > would not loop forever without calling yield.
> 
> This is provably impossible.  Reference "the halting problem".
> 
> > Files could be accessed by partially mapping them to memory.
> 
> See "man 2 mmap" for details.
> 
> > Anyway, if anyone would comment on any of this vapourware, I'd like to
> > hear it - off the list if you think it's too off topic.
> 
> Sorry, but your ideas have pretty much already been implemented (and in some 
> cases discarded).  :-/

You think this guy is a CompSci student with just enough knowledge
to be dangerous?

-- 
-----------------------------------------------------------------
Ron Johnson, Jr.
Jefferson, LA USA
PGP Key ID 8834C06B I prefer encrypted mail.

"The one function that TV news performs very well is that when
there is no news we give it to you with the same emphasis as if
it were."
David Brinkley

Attachment: signature.asc
Description: This is a digitally signed message part


Reply to: