Re: problem with MAP_SHARED|MAP_ANONYMOUS mapping in openMosix-2.4.26-1

Moshe Bar <[email protected]>
Newsgroups gmane.linux.cluster.openmosix.devel
Message-ID <[email protected]>
Ratna

Just tried to recreate the problem and I can't. It's not migrating the
process when I use mmap shared.

Moshe

On 9/25/05, Ratna Manoj Bolla <[email protected]> wrote:
>
>
>
> //-----------------------------------------------------------------------------
> #include<stdio.h>
> #include<sys/mman.h>
> #include <sys/types.h>
> #include <sys/stat.h>
> #include <fcntl.h>
> main() {
> int *a =
> mmap(0,4096,PROT_READ|PROT_WRITE,MAP_SHARED|MAP_ANONYMOUS,0,0);
> *a = 0;
> if(fork())
> while(1) { sleep(2); ++(*a); }
> else
> while(1) { printf("%d\n",*a); sleep(2); }
> }
>
>
> //------------------------------------------------------------------------------
>
> The output of this program should be
> 0
> 1
> 2
> 3
> .
> .
>
> but output would remain constant after migrating one of the processes.
>
> openMosix shold not allow migrating processes sharing
> MAP_SHARED|MAP_ANONYMOUS pages.
>
> from,
> Ratna Manoj Bolla,
> M.Tech IInd year,
> dept. of CSE,
> Indian Institute of Technology,
> Guwahati,
> India.
>
>
>
> -------------------------------------------------------
> SF.Net email is sponsored by:
> Tame your development challenges with Apache's Geronimo App Server.
> Download it for free - -and be entered to win a 42" plasma tv or your very
> own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php
> _______________________________________________
> openMosix-devel mailing list
> openMosix-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
> https://lists.sourceforge.net/lists/listinfo/openmosix-devel
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.