IPC queues : Number of messages

IPC queues : Number of messages

Post by Juha Willma » Sun, 14 Mar 1999 04:00:00



Hi   0

I have Wisio project on Linux where are multiple processes.
Processes are comminicating with each other by msgsnd/msgrcv
IPC commands. Queue is read by one process but many processes
may write to queue.

Now I have timing problems because sometimes queues becaming
full. This is solved by putting process to sleep when written
can not be made and wait for queue processing. This will
cause lose of efficient or even death locks.

One solution would be to send messages with another method, by
pipes etc, but is there way to get this work, because using
IPC queues is quite easy to manage.

Other solution would be to find out how many messages is in queue before

sending new messages.

With msgctl command I have now only command to get maximum of messages!

IS THERE ANY WAY TO GET CURRENT NUMBER OF MESSAGES IN QUEUE??


 
 
 

IPC queues : Number of messages

Post by Larry Blanchar » Sun, 14 Mar 1999 04:00:00



> Hi   0

> I have Wisio project on Linux where are multiple processes.
> Processes are comminicating with each other by msgsnd/msgrcv
> IPC commands. Queue is read by one process but many processes
> may write to queue.

> Now I have timing problems because sometimes queues becaming
> full. This is solved by putting process to sleep when written
> can not be made and wait for queue processing. This will
> cause lose of efficient or even death locks.

> One solution would be to send messages with another method, by
> pipes etc, but is there way to get this work, because using
> IPC queues is quite easy to manage.

> Other solution would be to find out how many messages is in queue before
> sending new messages.

> With msgctl command I have now only command to get maximum of messages!

> IS THERE ANY WAY TO GET CURRENT NUMBER OF MESSAGES IN QUEUE??

My manual says "msg_qnum" (from MSGCTL w/IPC_STAT) is the # currently on
queue.  This is a SysV manual, I don't have Linux up now, but would
assume it to be the same.

You should also be able to tune the kernel to increase the various
message limits.

--
Larry Blanchard - Old roses, old motorcycles, and old trains
Homo Sapiens is a goal, not a description.

 
 
 

1. Are UNIX IPC message queues bad?

Hi,
Are UNIX IPC message queues bad?
I was about to implement a message-passing application
using the message queues, but was stopped short by very
negative opinions in two books "Advanced Unix Programming"
by Rochkind, and "Advanced Programming in UNIX" by Stevens.

Can anyone comment from experience?
thanks,
Anil Philip

2. Question Coreadm ???

3. IPC: message queue

4. Behaviour of 'make' in Solaris 2.6

5. IPC message queues

6. PHP with MySQL support under Linux

7. ipc-message queue problem

8. Linux hates my partition table

9. If a process is blocked in IPC message queue msqid_ds.wwait or rwait ... ...

10. IPC with shared memory and message queues?

11. message queue (ipc) send error

12. Blocked process in IPC Message Queue or Sempahore ......

13. POSIX IPC message queues implementation error on Solaris 2.6