You are here: Re: Semaphore handling « PHP Programming Language « IT news, forums, messages
Re: Semaphore handling

Posted by Ratvin on 12/18/85 11:51

sem_remove will cause trouble if there are other processes blocking on
the semaphore. This has already been tried.

Is there any way to remove a semaphore only if there are no processes
waiting on it?

I mean to say that if there are processes blocking on the sem then
release the semaphore after use otherwise remove it.

I m in search of the best possible strategy to do this....

Any suggestions?

Thanks
Ratheesh K J

Marek Simon wrote:

> try sem_remove();
> Marek
>
> Unni napsal(a):
> > Hello all,
> >
> > I m facing a memory related problem with semaphores. Our business
> > application uses semaphores extensively and the limit imposed by the OS
> > on the number of semaphores that can exist on the system is only 128.
> >
> > This could be increased to a higher value but that would not be a
> > permanant solution to my belief. We are using the sem_get, sem_acquire
> > php functions. After the use we are releasing the semaphore by using
> > sem_release.
> >
> > The problem is that the semaphore will remain on the system until it is
> > rebooted. And once the limit of 128 semaphores is reached, any attemt
> > to create a new semaphore will result in a "No space left on device"
> > error.
> >
> > Can anybody help with any solutions in this regard.
> >
> > Thanks
> >
> > Ratheesh K J
> >

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация