lkml.org 
[lkml]   [1999]   [Apr]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Linux's Virtual Memory implementation
On Fri, 2 Apr 1999, Theodore Y. Ts'o wrote:
[deletia]
> As an example, my dad said that under Solaris you can
> start a program and then remove the disk that the
> program is on. I'm fairly sure Linux can't do that.
>
> Yes, you can't do this under Linux, but you can't do this under Solaris,
> either. That's because traditional OS's reserve swap space when a
> program starts, but they don't copy the program from the disk to the
> swap space before allowing the program to start, for the obvious
> performance reasons (think about how long it would take to copy GNU
> emacs from the /usr filesystem to swap space!!!). So under nearly all
> Unix systems, you can't unmount a filesystem if there's an executable
> being run from that filesystem.

Indeed, there's no reason to ever write pure code pages into swap space
since you can just page them from the original image. Only writable pages
should ever swap out; if an executable page's page frame is reclaimed then
the page should just be unmapped and forgotten, to be reread from the
image when faulted in. So you couldn't ever get to a state in which the
disk containing the image could be umounted while the image is running,
because it will always be busy.

--
Mark H. Wood, Lead System Programmer mwood@IUPUI.Edu
Specializing in unusual perspectives for more than twenty years.


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:51    [W:0.065 / U:0.100 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site