POV-Ray : Newsgroups : povray.off-topic : Found the dynamic optimization things... : Re: Found the dynamic optimization things... Server Time
30 Sep 2024 13:17:51 EDT (-0400)
  Re: Found the dynamic optimization things...  
From: Warp
Date: 23 Sep 2008 14:27:47
Message: <48d93522@news.povray.org>
Darren New <dne### [at] sanrrcom> wrote:
> Warp wrote:
> >   Most of what I have seen of these languages, especially the dynamic
> > ones, seems to be completely incompatible with DLLs.

> I don't follow. Both Java and .NET are basically 100% dynamically 
> loaded. Javascript and Python and such are also 100% dynamically loaded.

  It's not a question of whether it's dynamically loaded or not. It's
a question of whether programs which are running at the same time and
share a library use only one instance of that library, or is that library
loaded separately for both programs.

  There may be speed optimization advantages when loading the library on
a per-application basis, but at the cost of enormously increased memory
consumption. If you have a couple of hundreds of programs using the same
big library, if the library is loaded for every single one of them, the
system will require huge amounts of extra RAM.

> >   The amount of programs running at any given time can be counted in
> > the hundreds. The OS starts all kinds of processes and services just to
> > boot up. Every single one of them uses the exact same libc library, plus
> > a bunch of other common libraries. Given that libc is rather large,

> I suspect the amount of libc used by any particular program is somewhat 
> smaller, tho. The new Microsoft "Singularity" OS even inlines bits of 
> the kernel into your application - stuff like allocating pages of memory 
> doesn't even leave the subroutine doing it, let alone trap out.

  Loading a dynamically loadable library does not change the program being
executed (other than it's told where the functions it wants to call are
located).

  Inlining kernel code into the application makes sense only if that
doesn't increase the memory footprint of the application considerably.
If 2MB of kernel code would be inlined into each single application which
is run, that would be madness. The amount of apps running in a typical OS
is quite large, usually in the hundreds.

> > You wouldn't be able to build and entire OS created with that
> > programming language only. You *need* dynamically loadable libraries
> > for the system to work.

> Check out the Singularity OS. Real live working OS, with one of the 
> fundamental assumptions being that once you start a process, *nothing* 
> in the executable can change. No dynamic loading, no plug-ins, etc.

  Does that mean that every application has all the system libraries
statically linked to them, and this system library code exists in all
of them and are loaded into memory for all of them?

  Memory hogging to the max.

-- 
                                                          - Warp


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.