Thread View: comp.sys.sequent
4 messages
4 total messages
Started by Andre van der Vlies
Wed, 01 Mar 1989 14:28
Semaphores
Author: Andre van der Vlies
Date: Wed, 01 Mar 1989 14:28
Date: Wed, 01 Mar 1989 14:28
12 lines
767 bytes
767 bytes
Roaming around in the directories I've found the file /usr/include/sys/mutex.h .
Some _very_ interesting routines are mentioned there. Are these routine for
public use, and if so, how are they called by.
Could someone enlighten me please.
--
Andre v.d. Vlies
Algemene Hogeschool Amsterdam
Technische en Maritieme Faculteit
andre@htsa.uucp.nl or ...!hp4nl!htsa!andre
Re: Semaphores
Author: Fearfull Flambert
Date: Thu, 02 Mar 1989 15:29
Date: Thu, 02 Mar 1989 15:29
14 lines
998 bytes
998 bytes
In article <778@htsa.uucp> andre@htsa.uucp (Andre van der Vlies) writes:
->Roaming around in the directories I've found the file /usr/include/sys/mutex.h .
->Some _very_ interesting routines are mentioned there. Are these routine for
->public use, and if so, how are they called by.
->Could someone enlighten me please.
->
If you want to be enligtened, I can light you (auch auch) if you want !
--
Hans Trompert
Algemene Hogeschool Amsterdam
Technische en Maritieme Faculteit
hanst@htsa.uucp.nl or ...!mcvax!htsa!hanst
Re: Semaphores
Author: MFHorn
Date: Sat, 04 Mar 1989 00:20
Date: Sat, 04 Mar 1989 00:20
26 lines
1578 bytes
1578 bytes
> Roaming around in the directories I've found the file
> /usr/include/sys/mutex.h .
> Some _very_ interesting routines are mentioned there. Are these routine
> for
> public use, and if so, how are they called by.
I don't think you can call those routines from a user-level program.
I've seen most of the routines declared there in the kernel (being a
parallel architecture, you have to be very careful about resource
allocation; you're NOT the only process running).
Dynix does support user-level semaphores. See /usr/include/sys/{sem,ipc}.h
and the man pages for semop, semget and semctl.
I also have a program written by Jim Pickering that was posted some time
ago which graphically (curses) illustrates the dining philosophers problem
using semaphores.
--
"The most valuable commodity that I can think of, is information."
-Gordon Gecko, Wall Street
--
Andy Rosen | arosen@hawk.ulowell.edu | "I got this guitar and I
ULowell, Box #3031 | ulowell!arosen | learned how to make it
Lowell, Ma 01854 | | talk" -Thunder Road
RD in '88 - The way it should've been
Re: Semaphores
Author: Andre van der Vlies
Date: Mon, 06 Mar 1989 11:37
Date: Mon, 06 Mar 1989 11:37
56 lines
2746 bytes
2746 bytes
In article <11964@swan.ulowell.edu> arosen@hawk.ulowell.edu writes:
>> Roaming around in the directories I've found the file
>> /usr/include/sys/mutex.h .
>> Some _very_ interesting routines are mentioned there. Are these routine
>> for
>> public use, and if so, how are they called by.
>
>I don't think you can call those routines from a user-level program.
>I've seen most of the routines declared there in the kernel (being a
>parallel architecture, you have to be very careful about resource
>allocation; you're NOT the only process running).
>
>Dynix does support user-level semaphores. See /usr/include/sys/{sem,ipc}.h
>and the man pages for semop, semget and semctl.
>
>I also have a program written by Jim Pickering that was posted some time
>ago which graphically (curses) illustrates the dining philosophers problem
>using semaphores.
I know Dynix supports semop, semget, semctl. I find these routines very sluggish
and uncomprehensive. Besides that I often get a 'No space on device message'
when I try to open/get a lot of semaphores. We're giving a course in parallel
programming , and the s_lock calls are a heavy burden on the system when 15
persons are trying to solve the producer-consumer problem (especially when
something goes wrong :-) ). The SYS-V (semget etc.) semaphores are slow and seem
to be not available for all the users at any one time ( one can only open a
certain number of semaphores (where does this depend on ?)). Above all, I want
to be SURE I cannot use the calls declared in /usr/include/sys/mutex.h.
I know it looks/sounds dangerous to use those routines, that's why I've posted
this question on the net.
BTW, I'm VERY interessed in Jim Pickering's program. Could you please mail it
to me.
PS.
I've written some user interfaces to handle semaphores, so a user can
declare semaphores like this:
semaphore {
one,
two,
three,
four
};
and handle them with initsem(one,10);
WAIT(one);
SIGNAL(one);
--
Andre v.d. Vlies
Algemene Hogeschool Amsterdam
Technische en Maritieme Faculteit
andre@htsa.uucp.nl or ...mcvax!hp4nl!htsa!andre
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads