mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Richard B. Johnson" <root@chaos.analogic.com>
To: lya755@ece.northwestern.edu
Cc: linux-kernel@vger.kernel.org
Subject: Re: question about ramdisk
Date: Wed, 14 Jul 2004 12:57:04 -0400 (EDT)	[thread overview]
Message-ID: <Pine.LNX.4.53.0407141253050.16532@chaos> (raw)
In-Reply-To: <1089822621.40f55f9dd4278@core.ece.northwestern.edu>

On Wed, 14 Jul 2004 lya755@ece.northwestern.edu wrote:

> Thanks so much for the hint! Really appreciate it. I'll try out your
> suggestions.
>
> I am still a bit confused, though. If the code is in ramdisk, then it will be
> mapped to the process address space, which as I understand, does not involve
> any actual data copy and transfer. This sounds very reasonable. But what if
> the code is in hard disk? Would the kernel copy it to memory (somewhere
> allocated) then map this region as the text section for the address space, and
> then run the instructions from ram? That's the way I understand it, but I
> don't know whether that is correct.
>
> Thanks!
> Lei

The instructions are always executed from RAM even if the executable
file is on a physical disk. The file is memory-mapped. Execute
`man mmap`. One of the parameters is MAP_FILE. The whole file
is mapped, however, only that which is necessary at a particular
time is actually read from the disk, one page at a time.

Cheers,
Dick Johnson
Penguin : Linux version 2.4.26 on an i686 machine (5570.56 BogoMips).
            Note 96.31% of all statistics are fiction.



      reply	other threads:[~2004-07-14 16:57 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-07-12 16:57 lya755
2004-07-12 17:13 ` H. Peter Anvin
2004-07-13 14:01   ` lya755
2004-07-13 20:06     ` Lee Revell
2004-07-13 21:27       ` Lee Revell
     [not found]       ` <1089753034.40f44fca074c2@core.ece.northwestern.edu>
     [not found]         ` <1089753955.22175.8.camel@mindpipe>
2004-07-14 14:59           ` lya755
2004-07-14 16:07             ` Richard B. Johnson
2004-07-14 16:30               ` lya755
2004-07-14 16:57                 ` Richard B. Johnson [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.LNX.4.53.0407141253050.16532@chaos \
    --to=root@chaos.analogic.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lya755@ece.northwestern.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®