On 23-May-01 Seigo Tanimura wrote:
> The issue of both of the solutions briefed above is that the p_pgrp
> lock protects *excess* data. It might be another solution to introduce
> a new mutex (p_pgrpmtx) into struct proc to lock p_pgrp. Although
> memory size costs per process, contention for p_pgrp lock should occur
> much less than to adopt a session lock or a global lock.
> 
> As psignal() and some other functions also read p_pgrp, p_mtx should
> also lock p_pgrp. You lock either p_pgrpmtx or p_mtx to read p_pgrp,
> and both of the locks to modify p_pgrp.

Sounds good.  I would just use a global p_grp lock for now.  It can always be
changed to be more fine-grained later if desired.

-- 

John Baldwin <[EMAIL PROTECTED]> -- http://www.FreeBSD.org/~jhb/
PGP Key: http://www.Baldwin.cx/~john/pgpkey.asc
"Power Users Use the Power to Serve!"  -  http://www.FreeBSD.org/

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message

Reply via email to