[Subject Prev][Subject Next][Thread Prev][Thread Next][Subject Index][Thread Index]

Re: Somethings about libraries..



Hi

I remember this is because in our unix class, there was heavy debate about this. It was
SVR4.0 Unisys v/s VB5.0 types. What I am curious about is, does linux use same philosophy?

Ideally I would expect that there would be one copy of each program code segment per CPU.
But all this scheme doesn't work if code segment is writable, but I hope that's very rare.

I have noticed that when I run KMP3, there are two instanes of KMP3, which shows same
amount of shared memory, well almost same. Does this lead to any conclusion?

Any kernel hacker? Archan?

 Bye
   Shridhar

Kedar Patankar wrote:

> Hi,
>
> In case of shared libraries, its correct. Only one copy of the shared
> library code exists in the core at any time. But about apps, I am not
> sure whether if all the instances of bash running on a box share the same
> code "segment". If an app forks then yes, the children would share the
> same code area, but I doubt if two unrelated instances of the same
> executable share the same code area.