Usenet comp.sys.dec (1990-2013)
 help / color / mirror / Atom feed
From: davidtfh@slip.technet.sg (Irene Seah)
Subject: Help : Problem with System V Semaphores
Date: 1995/08/08	[thread overview]
Message-ID: <4069u7$1lm@raffles.technet.sg> (raw)

Hi! 
Currently, I faced some difficulty dealing with the above semaphores.
There are three processes that are trying to access a common resource. 
The access of this common resource is controlled with the use of System V 
IPC-Semaphores (with undo facility). 

The problem that I faced is as follows
Process 1 is currently accessing the common resource say at 00:00:00 
(semphore is locked). Process 2 at 00:00:45 is trying to access the 
resource followed by Process 3 at 0:02:50 is trying to access too. 
The problem is why Process 3 get the resource instead of Process 2 
at 0:04:10. On top of that, when Process 1 retries, it manages to get 
the resource back at 0:05:45. Process 2 only manage to get the resource 
at 0:07:00.

The above  processes are running in the same priority (not set). 
The system that the processes are run on is DEC ALPHA OSF/1

I have tried using the scheduler to set a higher priority for process 2 
but results in the kernel allocating too much timeslice for process 2 and
this is undesirable.

My questions are :

1. Why Process 3 get the resource instead of Process 2?
2. Isn't it the access of semaphores FIFO
3. If Process 2 loses its timeslice, why it only manage to get it back 
   after 7 minutes?
4. Is there any way that every process has a equal chance to access the 
    resource? That is, the first to request will be the first to get it.

Urgently requires some advice!!!

Thanks

Irene







             reply	other threads:[~1995-08-08  4:00 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1995-08-08  4:00 Irene Seah [this message]
1995-08-08  4:00 ` Help : Problem with System V Semaphores Ron Natalie
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox