linux-mips
[Top] [All Lists]

Linux Shared Memory Issue

To: linux-mips@oss.sgi.com
Subject: Linux Shared Memory Issue
From: "Maurice Turcotte" <turcotte@broadcom.com>
Date: Wed, 24 Apr 2002 17:27:12 -0400
Cc: "Maurice Turcotte" <mturc@broadcom.com>
Importance: Normal
Reply-to: turcotte@broadcom.com
Sender: owner-linux-mips@oss.sgi.com
Greetings:

I am having a problem with Linux Kernel 2.4.5 on a mips.

I have two processes using share memory for IPC. This same
code works fine with Kernel 2.4.7 on a x86. The problem is 
that the second process reads old data out of the shared
memory.

The executive summary->

Process #1 writes "A" to shared memory at 0x2aac7210
Process #2 reads 0 from shared memory at address 0x2aaca210
Process #1 writes "B" to shared memory at 0x2aac7210
Process #2 read "A" from shared memory at address 0x2aaca210
Process #1 writes "C" to shared memory at 0x2aac7210
Process #2 read "B" from shared memory at address 0x2aaca210

It is interesting that the processes get different addresses
associated with the same shmId. I assume this is because of 
some user-space mapping that is going on.

I left out the semaphore diddling, but I believe that part of
the code is correct because it works flawlessly on the 2.4.7 x86.

Any tips on debugging this would be greatly appreciated. If this
is not the proper forum for questions like this, please point me
in the right direction.

Thanks,

mturc


<Prev in Thread] Current Thread [Next in Thread>