No merging is necessary to share program text -- program text is 100% shared already, because it's loaded with memory mapping.
It's easy to share file-backed memory maps because they're not anonymous. No contents need to be checked, just locations. Map the same location, get the same pages.
Thanks for all your input. Can anyone explain me little about how program text sharing happens in Linux while loading the program.
This is what I found in pmap of bash process, suppose if another bash process is started will these areas will be shared, how they are shared while new bash is created. (is there any info that kernel keeps to know that these files are loaded at these parts)
Ok, I'm kind of in between newbie and experienced somewhere. I'm an advanced computer user but only have a little experience with linux and a lot of problems with it. Currently I'm using Linux-Mandrake 8.0 (I know, I know, but let's not go into the many reasons why it's not even close to the best... (2 Replies)
Well Guys, will anybody solve my problem?
I have installed Win XP and RH Linux 9 (Dual Boot) on an Intel x86 Machine. Everything is going fine except that I cannot share files among the two operating systems. For example, if I download a PDF file from internet and save it in my Win XP partition... (1 Reply)
I have RedHat 9.0 installed on three of my servers (PIII - 233MHz) and want that they share a common IP address so that any request made reaches each of the servers.
Can anyone suggest how should I setup my LAN. I'm new to networking in Linux so please elaborate and would be thankful for a timely... (2 Replies)
Sometimes you get the tiger...but sometimes he get you and this latest home network “project” of mine has gnawed on me pretty badly. Perhaps you can offer some technical help. It will be heartily appreciated.
I have a small home network initially comprising two computers running Windows... (1 Reply)
I keep getting a access denied error when I install from the XP wizard my Linux shared printer.
CUPS CONFIGURATION FILE
<Location /admin>
#
# You definitely will want to limit access to the administration functions.
# The default configuration requires a local connection from a user who
#... (2 Replies)
Hi,
Anyone can tell me how do i create Linux manual page.
I copied ls manual page from /usr/share/man/man1/ls.1.gz
and unziped ls.1.gz
got one file ls.1
If i apply man ls.1 it is displaying man page of ls.
Similarly i want to create myExe.1 file ,
man myExe.1 should display... (2 Replies)
HI
i have setuped a nfs between a AIX system and a linux os ,keeping AIX as sever
i need to share the CDrom in AIX server with the linux operating system. ie. linux os
machine does't have a cdrom . will i be able be share ..i tried a lot but it gives a message which resembles NFS access... (3 Replies)
Versions : RHEL 6.xx /OL 6.xx
I am trying to understand what a page is in Linux? The concept should be same in Unix as well, I guess
The below doc says "A page is a block of virtual memory. A typical block size on Linux operating system is 4KB "
... (4 Replies)
I'd like to share some experiences and what I found for NIS migration from Solaris 8 NIS to Linux platform.
I'm not an expert for both platforms, it's just when I tested both systems and found something really tricky. That might takes a lot of time for you to find the root cause. So, I think I can... (11 Replies)
Discussion started by: bestard
11 Replies
LEARN ABOUT LINUX
set_tid_address
SET_TID_ADDRESS(2) Linux Programmer's Manual SET_TID_ADDRESS(2)NAME
set_tid_address - set pointer to thread ID
SYNOPSIS
#include <linux/unistd.h>
long set_tid_address(int *tidptr);
DESCRIPTION
The kernel keeps for each process two values called set_child_tid and clear_child_tid that are NULL by default.
set_child_tid
If a process is started using clone(2) with the CLONE_CHILD_SETTID flag, set_child_tid is set to child_tidptr, the fifth argument of that
system call.
When set_child_tid is set, the very first thing the new process does is writing its PID at this address.
clear_child_tid
If a process is started using clone(2) with the CLONE_CHILD_CLEARTID flag, clear_child_tid is set to child_tidptr, the fifth argument of
that system call.
The system call set_tid_address() sets the clear_child_tid value for the calling process to tidptr.
When clear_child_tid is set, and the process exits, and the process was sharing memory with other processes or threads, then 0 is written
at this address, and a futex(child_tidptr, FUTEX_WAKE, 1, NULL, NULL, 0); call is done. (That is, wake a single process waiting on this
futex.) Errors are ignored.
RETURN VALUE
set_tid_address() always returns the PID of the calling process.
ERRORS
set_tid_address() always succeeds.
VERSIONS
This call is present since Linux 2.5.48. Details as given here are valid since Linux 2.5.49.
CONFORMING TO
This system call is Linux-specific.
SEE ALSO clone(2), futex(2)COLOPHON
This page is part of release 3.27 of the Linux man-pages project. A description of the project, and information about reporting bugs, can
be found at http://www.kernel.org/doc/man-pages/.
Linux 2004-09-10 SET_TID_ADDRESS(2)