home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 10 Tools
/
10-Tools.zip
/
DMAKE35X.ZIP
/
_README.OS2
< prev
next >
Wrap
Text File
|
1990-08-15
|
4KB
|
92 lines
This file is not part of the official documentation for dmake 3.5.
----------
When I saw the dmake 3.5 sources in comp.sources.misc, with parallel making
for Unix and an (of course sequential) port for MS-DOS, I thought it must be
easy to create a parallel OS/2 version by taking the appropriate sources
from both versions.
I was just curious if a parallel make would really save time. As far as
I know, GNU make also has parallel make but is much harder to port to non-
Unix systems. Also, I do not really need make, because I alway use my own
project manager, CS (compiler shell), which was already posted to comp.
binaries.os2. But this port was rather easy ...
I did this just for fun and learning a bit about processes.
The following changes were made:
1. The doc said that MS C 4.0 could be used for compilation, but was not
tested. For MS C 5.1, several small changes were needed.
2. The Unix versions of rmprq.c and explode.c had to be used instead of
the DOS rmprq.c.
3. The Unix version of runargv.c had to be adapted to OS/2, using spawnvp()
instead of fork() and execvp() and the OS/2 function DosKillProcess()
instead of kill().
4. Some cosmetic changes for the usage page were made (-h option).
5. A fflush() call had to be added when echoing the commands before
execution (may be needed for other versions too).
6. The DOS module _chdir.c had to be changed using DosSelectDisk() instead
of int86(...) for OS/2 (with #ifdef ...).
7. The Explode_prq() macro had to be #ifndef'ed for OS/2 in config.h.
8. The tempnam.c module had to be fixed.
9. The startup file was changed from $(ROOTDIR)/etc/startup.mk to
$(INIT)/dmake.ini which better fits into DOS and OS/2 naming conventions
Changes were made in startup.h and ruletab.c. (Usually people have the
environment variable INIT pointing to a directory with the TOOLS.INI
file for the MS editor and its my favourite place for all init files,)
10. The MAXPROCESSLIMIT/MAXPROCESS definitions had to be changed in
ruletab.c. :-)
11. Altough the getswitchar() function can be used to get the actual
setting from DOS, I hardcoded '-' because I (and many others) ALWAYS
use that character for switches (who uses / ?) independent of the
actual switchar setting.
These patches (except 3.) are found in dmake.dif (context diff's).
The OS/2 version of runargv.c is in os2/runargv.c.
I did not use dmake to make itself, but my compiler shell CS :-)
Therefore I did not update the makefile.mk. The script dmake.cs is for
the original DOS version, dmake2.cs is for the parallel OS/2 version.
dmake.bad and dmake.def are used by this script.
dmake.exe is the final OS/2 parallel version (compact model). It runs
under MS-DOS too, but sequential only, of course. By default, it is
sequential under OS/2 too, the -P# has to be used to enable the parallel
making.
Now the test results:
I used dmake to compile my DOS and OS/2 port of GNU tar (thats the only
non-trivial program I have a functioning makefile for, for all others, I
use CS only :-).
Sequential dmake: 232.0 seconds
dmake with 2 processes: 213.0 seconds
dmake with 4 processes: 209.0 seconds
dmake with 8 processes: 203.5 seconds
dmake with 16 processes: 207.5 seconds
I used an '386 with 24 MHz and 8 MB RAM, running IBM OS/2 1.2 configured
with 1 MB disk cache and 1 MB RAM-disk. All processes, even the 16 ones
in the last test fit into this memory, no swapping occurres.
I have a RLL disk with 25ms access time and 660 kB per second transfer rate.
It seems that about 8-10 processes are the best for this machine.
The saving was about 13% of the time in the 8-process case.
Maybe that I test this on a VAX under Ultrix sometimes to compare the
results.
Kai Uwe Rommel
rommel@lan.informatik.tu-muenchen.dbp.de