From mboxrd@z Thu Jan 1 00:00:00 1970 MIME-Version: 1.0 In-Reply-To: References: Date: Thu, 19 Dec 2013 14:28:47 -0600 Message-ID: From: Blake McBride To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> Content-Type: multipart/alternative; boundary=001a11c2f4824153d304ede90291 Subject: Re: [9fans] mk time-check/slice issue Topicbox-Message-UUID: a2a2cd16-ead8-11e9-9d60-3106f5b1d025 --001a11c2f4824153d304ede90291 Content-Type: text/plain; charset=ISO-8859-1 On Thu, Dec 19, 2013 at 2:15 PM, Richard Miller <9fans@hamnavoe.com> wrote: > > I see your point but would argue (in the most > > friendly way) that the case you point out would be extremely rare, while > > the reverse case is very common. > > "Correctness" (in the context of software engineering) doesn't mean > doing the right thing in all but the rarest cases; it means doing the > right thing in every case. Multiprocessor race conditions are > extremely rare, but that doesn't absolve us from putting locks around > critical sections in the kernel to guarantee that "rare" becomes > "never". > > Remember mk is not just used to compile stuff. It's a "general tool > for describing and maintaining dependencies between files or > programs". If there are cases (even extremely rare ones) when mk can > finish without establishing all the described dependencies, it's > broken. Given the simple low-resolution time stamps currenly > supported by the Plan 9 file protocol, ensuring that files are updated > correctly may come at a cost of doing some redundant work. > > Think a bit further outside the box than a single-user computer being > used to compile programs. Suppose for example there's a cron script > which uses mk to update indices for the lookman(1) command, or to > update hash files for ndb(8). What if someone (maybe in another > timezone!) happens to be editing a man page or ndb file when the cron > job activates. Oops, race condition. Extremely rare like most race > conditions, but I for one am happy that mk is robust enough do the > right thing when the rare occurrence occurs. > I see your point, and agree. I suppose I have been arguing for an _option_ that would assist one person working in one tree at a time - a common but not utterly common situation. Also, see my earlier point about fast, prior dependencies unnecessarily triggering very time consuming dependencies. Having been envolved with projects that take 4 hours to build, this could be very significant. Again, the _option_ would help a great deal. Thanks. Blake --001a11c2f4824153d304ede90291 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
On T= hu, Dec 19, 2013 at 2:15 PM, Richard Miller <9fans@hamnavoe.com>= wrote:
> I see your point but = would argue (in the most
> friendly way) that the case you= point out would be extremely rare, while
> the reverse case is very common.

"Correctness" (in the context of software engineering) does= n't mean
doing the right thing in all but the rarest cases; it means do= ing the
right thing in every case. =A0Multiprocessor race conditions a= re
extremely rare, but that doesn't absolve us from putting l= ocks around
critical sections in the kernel to guarantee that "rare&q= uot; becomes
"never".

Remember mk is not just used to compile stuff. =A0It's a &= quot;general tool
for describing and maintaining dependencies between files or programs". =A0If there are cases (even extremely rare one= s) when mk can
finish without establishing all the described dependencies, it= 's
broken. =A0Given the simple low-resolution time stamps c= urrenly
supported by the Plan 9 file protocol, ensuring that files are= updated
correctly may come at a cost of doing some redundant work.

Think a bit further outside the box than a single-user computer being
used to compile programs. =A0Suppose for example there's a= cron script
which uses mk to update indices for the lo= okman(1) command, or to
update hash files for ndb(8). =A0Wha= t if someone (maybe in another
timezone!) happens to be editing a man page or ndb file when the cron
job activates. =A0Oops, race condition. =A0Extremely rare like= most race
conditions, but I for one am happy that mk = is robust enough do the
right thing when the rare occurrence occurs.
<= div>
I see your point, and agree. =A0I suppose I have been ar= guing for an _option_ that would assist one person working in one tree at a= time - a common but not utterly common situation. =A0Also, see my earlier = point about fast, prior dependencies unnecessarily triggering very time con= suming dependencies. =A0Having been envolved=A0with projects t= hat take 4 hours to build, this could be very significant. =A0Again, the _o= ption_ would help a great deal.

Thanks.

Blake

--001a11c2f4824153d304ede90291--