httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r..@ai.mit.edu (Robert S. Thau)
Subject Re: my whack at better status output
Date Mon, 29 Apr 1996 18:16:13 GMT
  Well, writing and reading from shared memory gets really unsafe w/o
  semaphores, or even a shm manager in extreme cases.

In general, sure --- you have to be extremely careful.  But *in this
particular instance*, where all we are talking about is a bunch of reads
to generate a status report on a situation which will have changed by
the time it is viewed anyway, I don't see any particular concern.

(NB the scoreboard is carefully structured so that it can be written
safely without locking, by making sure that there is only one process
which can write to a given scoreboard entry at a given time --- either
the child process to which the slot is allocated, if it is alive, or
the parent "caretaker" process if a child process dies.  The parent
knows which slots it owns because wait() informs it of a child
process's death; the children know which slot they own because they
are told by the parent).

rst

Mime
View raw message