Re: Problems in 1.3.93

Matthias Urlichs (smurf@smurf.noris.de)
Tue, 23 Apr 1996 20:52:51 +0100


In linux.dev.kernel, article <96Apr23.085149+0200eet_dst.63246-21431+9@=
mea.utu.fi>,
Matti E Aarnio <mea@mea.cc.utu.fi> writes:
>=20
> Semaphore in the shared memory segment via atomic (as far
> as it can be done) memory read-modify-write ? Nice in
> theory, but how do you guarantee anything of the scheduling
> of the processes attached to that semaphore ? I hate to
> run things in busy-loops, and HOPE for deterministic
> behaviour...
>=20
Easy, you don't use semaphores, you use a shared named pipe. Write one
character for an up() operation, read one for down().

> Multiple (named)pipe writers can cause writes to merge
> when the reader sees them. AF_UNIX named sockets have
> similar problems with multiple writers. STREAMS works
> (getmsg()/putmsg()-mode, not read()/write()!)
>=20
read()/write() works correctly if you do an ioctl(fd,I_SRDOPT,RMSGN) or
RMSGD.

> Furthermore, the SYSV IPC is supported in some esoteric
> real-time platforms as well, so while developing for
> those targets, I use it at my development environments.
>=20
Good point.

--=20
The fragrance always stays in the hand that gives the rose.
- Hada Bejar -
--=20
Matthias Urlichs \ Noris Network GmbH i.Gr/ Xlink-POP N=FCrnberg=
=20
Schleiermacherstra=DFe 12 \ Linux+Internet / EMail: urlichs@nor=
is.de
90491 N=FCrnberg (Germany) \ Consulting+Programming+Networking+etc'i=
ng
PGP: 1B 89 E2 1C 43 EA 80 44 15 D2 29 CF C6 C7 E0 DE=20
Click <A HREF=3D"http://smurf.noris.de/~smurf/finger">here</A>. =
42