should mk run targets in parallel on Windows?

Skip to first unread message

Jason Catena

Feb 16, 2011, 6:24:30 PM2/16/11
to acme-sac
mk in acme-0.13 (latest delivery for Windows) apparently runs all jobs
in serial by default. In mk.b, sflag defaults to 1, which means
serial as I read the code. The -s option reassigns 1 to sflag. So
there's no way with the delivered code to run targets in parallel.

To exercise the parallel code, I changed sflag to default to 0, and
recompiled as a new file pmk.dis, but this also dispatches and
completes all jobs in the same order, and waits till one finishes
before starting the next one.

To test this I gave mk 10 shell scripts (0 to 9) to run at once, each
of which sleep for 10-n seconds (so script 0 sleeps for 10 seconds).
If they were executed in parallel, I would expect to all 10 started
before 0 finishes, and finish in roughly reverse order.

Is this a known issue with mk in acme-sac, or an unavoid(able|ed)
problem with the Windows port? I don't see that the latest code
(which presumably runs in OSX and Linux too) of mk.b is any different
as regards sflag, and there's no issue apparently about this in the

Thanks very much for maintaining all this in the first place,
Jason Catena

Caerwyn Jones

Feb 17, 2011, 10:31:34 PM2/17/11
The ability to run jobs concurrently also depends on the value of $NPROC.
This is also default to 1 so setting sflag doesn't change the behavior.
It also looks like nproclimit is always set to 1 regardless of NPROC.

This maybe because the VM doesn't support multiple cores so setting
NPROC > 1 and getting true concurrency out of inferno mk isn't really
an option.

This question might also be asked on the inferno-os list since there is really
no difference between mk in acme-sac and inferno-os.


Reply all
Reply to author
0 new messages