From owner-freebsd-hackers Sat Jun 26 2:16:15 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from midget.dons.net.au (daniel.lnk.telstra.net [139.130.137.70]) by hub.freebsd.org (Postfix) with ESMTP id BB66C14FB9 for ; Sat, 26 Jun 1999 02:16:06 -0700 (PDT) (envelope-from doconnor@gsoft.com.au) Received: from guppy.dons.net.au (guppy.dons.net.au [203.31.81.9]) by midget.dons.net.au (8.9.3/8.9.1) with ESMTP id SAA25107; Sat, 26 Jun 1999 18:44:54 +0930 (CST) (envelope-from doconnor@gsoft.com.au) Message-ID: X-Mailer: XFMail 1.3 [p0] on FreeBSD X-Priority: 3 (Normal) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="_=XFMail.1.3.p0.FreeBSD:990626184454:34751=_"; micalg=pgp-md5; protocol="application/pgp-signature" In-Reply-To: <19990626085948.25145.qmail@nwcst277.netaddress.usa.net> Date: Sat, 26 Jun 1999 18:44:54 +0930 (CST) From: "Daniel J. O'Connor" To: Jesus Monroy Subject: Re: [Re: [Re: coarse vs fine-grained locking in SMP systems]] Cc: Ville-Pertti Keinonen , hackers@freebsd.org, "Daniel J.OConnor" Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG This message is in MIME format --_=XFMail.1.3.p0.FreeBSD:990626184454:34751=_ Content-Type: text/plain; charset=us-ascii On 26-Jun-99 Jesus Monroy wrote: > The part I'm lost on is "can change things from under it". > From under what? I assume the statement means "it" as being > the code or driver. So the question begs, what things can > change? The assumption that changes is that your code assumes (well mine does :) that it can only have one processor running at at once for routines like open, read, etc.. So no locking is done to protect those routines. Like what happens if CPU 0 is running your drivers open code, then CPU 1 starts running it (because a user program did an open call) then your driver will be confused because it assumes that the open call is only being executed by one CPU. To protect against it you'd need to grab a mutex when you enter open (or block waiting for the other CPU to release it) --- Daniel O'Connor software and network engineer for Genesis Software - http://www.gsoft.com.au "The nice thing about standards is that there are so many of them to choose from." -- Andrew Tanenbaum --_=XFMail.1.3.p0.FreeBSD:990626184454:34751=_ Content-Type: application/pgp-signature -----BEGIN PGP MESSAGE----- Version: 2.6.3ia iQCVAwUBN3SaDWj0TqzKxF7VAQGsHgP9FcRFdsnAGXJI6rQI+Rt2iiv3HdGfZ3Wq ouzcis2tvBgGambsXrs3GpEY5O4bzFtSzBVR9j2HgEocRjJ9OLy3rq3OTbWE/ZFS Tn91QXgA9hx+uWnwz0iU80apRfwD0uwOELBkeAz7q86U25XcKqbyWCec7vHal6Wm /D8lMsmF8Zg= =3PkF -----END PGP MESSAGE----- --_=XFMail.1.3.p0.FreeBSD:990626184454:34751=_-- End of MIME message To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message