9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: Blake McBride <blake@mcbride.name>
To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net>
Subject: Re: [9fans] mk time-check/slice issue
Date: Thu, 19 Dec 2013 14:28:47 -0600	[thread overview]
Message-ID: <CABwHSOtGctXsh=CT5aEvR8wME-juYY784+TW9H7N1f1FZx_TRA@mail.gmail.com> (raw)
In-Reply-To: <e4c8dc2c5d2f29c5dd7fca3a63e74552@hamnavoe.com>

[-- Attachment #1: Type: text/plain, Size: 2112 bytes --]

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

[-- Attachment #2: Type: text/html, Size: 5660 bytes --]

  reply	other threads:[~2013-12-19 20:28 UTC|newest]

Thread overview: 50+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-18 22:01 Blake McBride
2013-12-18 22:08 ` Matthew Veety
2013-12-18 22:42   ` Blake McBride
2013-12-18 22:16 ` erik quanstrom
2013-12-18 22:46   ` Blake McBride
2013-12-19  5:40     ` erik quanstrom
2013-12-19  6:07       ` Bakul Shah
2013-12-19 10:59         ` Charles Forsyth
2013-12-19 14:21           ` Oleksandr Iakovliev
2013-12-19 14:58             ` erik quanstrom
2013-12-19 14:52       ` Blake McBride
2013-12-19 14:55         ` erik quanstrom
2013-12-19 15:58           ` Blake McBride
2013-12-19 16:30             ` Tristan
2013-12-19 16:37               ` Blake McBride
2013-12-19 16:40                 ` Jacob Todd
2013-12-19 17:05                   ` Blake McBride
2013-12-19 17:24                 ` Tristan
2013-12-19 18:30                   ` Blake McBride
2013-12-19 17:59             ` Steffen Daode Nurpmeso
2013-12-19 17:07         ` a
2013-12-19 18:40           ` Blake McBride
2013-12-19 18:58             ` Kurt H Maier
2013-12-19 19:06             ` Matthew Veety
2013-12-19 19:07             ` Kurt H Maier
2013-12-19 19:20               ` Blake McBride
2013-12-19 19:27                 ` Kurt H Maier
2013-12-19 19:42                   ` Blake McBride
2013-12-19 20:02                     ` Kurt H Maier
2013-12-19 20:18                       ` erik quanstrom
2013-12-19 20:23                         ` Kurt H Maier
2013-12-19 19:35                 ` a
2013-12-19 19:09             ` a
2013-12-27 10:16               ` dexen deVries
2013-12-19 19:09             ` erik quanstrom
2013-12-19 19:29               ` Blake McBride
2013-12-19 19:39                 ` Gabriel Diaz
2013-12-19 20:15                 ` Richard Miller
2013-12-19 20:28                   ` Blake McBride [this message]
2013-12-19 20:45                     ` Richard Miller
2013-12-20 15:23                       ` Aram Hăvărneanu
2013-12-19 19:12             ` Skip Tavakkolian
2013-12-19 19:22               ` Blake McBride
2013-12-19 19:43                 ` Rudolf Sykora
2013-12-19 19:58                   ` Blake McBride
2013-12-19 19:26             ` sl
2013-12-19 10:01     ` Richard Miller
2013-12-19 15:01       ` erik quanstrom
     [not found] <CAC0DbM5safEHO_MFpBazvvH6CcGQXGTow-Fe7fkqkP6GrU1Xzw@mail.gmail.com>
     [not found] ` <CAC0DbM7S-xZvOSDwB6KoWH2X8ny_57F9mBE7gaB_BuWR5RSJiw@mail.gmail.com>
2013-12-18 23:09   ` Jason Catena
2013-12-19  5:47     ` erik quanstrom

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CABwHSOtGctXsh=CT5aEvR8wME-juYY784+TW9H7N1f1FZx_TRA@mail.gmail.com' \
    --to=blake@mcbride.name \
    --cc=9fans@9fans.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).