Re: Can someone explain how a App on a Network server works?

From: Tony Proctor (tony_proctor_at_aimtechnology_NOSPAM.com)
Date: 03/02/04


Date: Tue, 2 Mar 2004 10:19:21 -0000

When you execute a normal EXE on a local drive, the O/S actually "memory
maps" the code from the *.exe file, thus making it appear as part of the
process virtual address space, and then passes control to it. Note that this
is different to it actually being loaded into RAM, or "physical memory". As
sections of that code are executed, the normal virtual memory paging brings
the relevant bit of code into physical memory on demand, as they're needed.

Although memory mapping can load a file from a network drive, I believe the
file content is first fetched across the network into a local temporary
file, and then memory mapped (all quietly, behind the scenes). This is
because the virtual memory paging would be at a lower-level in the O/S than
network access, and so cannot access a non-local disk.

An EXE file is usually marked as "busy" when being executed because the code
is being loaded into RAM on-demand, and the O/S has to prevent anything not
yet loaded from being changed, or moved, before it gets to it. I find it
annoying that this locking also seems to prevent a rename operation too,
which isn't really modifying any data. Under UNIX, your can perform a 'mv'
command on an executing program with no problems.

I'm not aware of any XP differences in this area. I'm not running XP here so
maybe someone else can tell me if you can successfully rename an executing
local file. If it only works when executing a remote file then it sounds
like the *whole* file is being fetched across the network, and the busy lock
released on it before memory mapping the local version. I'm guessing here
though.

            Tony Proctor

"Darwin Weyh" <shtdev.delete.this@weyh.net> wrote in message
news:#M2Byd5$DHA.1956@TK2MSFTNGP10.phx.gbl...
> I have an application (appname.exe) that I have developed in VB6 and it is
> run on the user workstations from a Network drive.
> This way I only have to update it in one place for minor changes (i.e. no
> new controls and such).
> Now when I go to update the .exe file I just rename it to
> (appname.exe.exe.00x) to keep a backup in case I break it instead of
fixing
> it.
> If the App is running on a WIN98 user machine it prevents me from renaming
> because it is in use. But on XP user machines it does allow me to rename
it.
>
> Can someone explain what is happening here?
> I assume the XP user must restart the App to get the new changes?
> Is this correct?
>
> Thanks
> --
> Darwin C. Weyh
> shtdev.delete.this@weyh.net
> And for the spammers: dweyh@weyh.net
>
>



Relevant Pages

  • Re: Can someone explain how a App on a Network server works?
    ... and then passes control to it. ... >the relevant bit of code into physical memory on demand, ... >command on an executing program with no problems. ... >maybe someone else can tell me if you can successfully rename an executing ...
    (microsoft.public.vb.general.discussion)
  • Re: Data Execution Prevention
    ... >>DEP prevents malicious code from executing from protected areas of memory. ... > It has no inherent notion of "maliciousness". ...
    (microsoft.public.windowsxp.general)
  • Re: Linked List & Dynamic Memory Allocation
    ... understand what you meant by stack and heap. ... process is done executing and will it always lurk in the memory if OS ... this program large number of times, it will end of exhausting system ...
    (microsoft.public.vc.mfc)
  • Re: Self booting systems with out bootloader?!!!
    ... A non-fragmented memory just means that every byte from the start of memory ... This means that after a reset is made, ... in processor ROM. ... executing the 'work program'. ...
    (comp.arch.embedded)
  • Re: Execution of a COM file complied with BDS C
    ... gets around to executing your code? ... My situation is rather peculiar in that I'm running a hacked up CPM ... system resulted in "Out of Memory Program Aborted". ... great little compiler for the 8080, btw. Had mine since Aug 85. ...
    (comp.os.cpm)