home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / DMAKE35X.ZIP / _README.OS2 < prev    next >
Text File  |  1990-08-15  |  4KB  |  92 lines

  1. This file is not part of the official documentation for dmake 3.5.
  2. ----------
  3.  
  4. When I saw the dmake 3.5 sources in comp.sources.misc, with parallel making
  5. for Unix and an (of course sequential) port for MS-DOS, I thought it must be
  6. easy to create a parallel OS/2 version by taking the appropriate sources
  7. from both versions.
  8.  
  9. I was just curious if a parallel make would really save time. As far as
  10. I know, GNU make also has parallel make but is much harder to port to non-
  11. Unix systems. Also, I do not really need make, because I alway use my own
  12. project manager, CS (compiler shell), which was already posted to comp.
  13. binaries.os2. But this port was rather easy ...
  14. I did this just for fun and learning a bit about processes.
  15.  
  16. The following changes were made:
  17.  
  18. 1.  The doc said that MS C 4.0 could be used for compilation, but was not
  19.     tested. For MS C 5.1, several small changes were needed.
  20.  
  21. 2.  The Unix versions of rmprq.c and explode.c had to be used instead of
  22.     the DOS rmprq.c.
  23.  
  24. 3.  The Unix version of runargv.c had to be adapted to OS/2, using spawnvp()
  25.     instead of fork() and execvp() and the OS/2 function DosKillProcess()
  26.     instead of kill().
  27.  
  28. 4.  Some cosmetic changes for the usage page were made (-h option).
  29.  
  30. 5.  A fflush() call had to be added when echoing the commands before
  31.     execution (may be needed for other versions too).
  32.  
  33. 6.  The DOS module _chdir.c had to be changed using DosSelectDisk() instead
  34.     of int86(...) for OS/2 (with #ifdef ...).
  35.  
  36. 7.  The Explode_prq() macro had to be #ifndef'ed for OS/2 in config.h.
  37.  
  38. 8.  The tempnam.c module had to be fixed.
  39.  
  40. 9.  The startup file was changed from $(ROOTDIR)/etc/startup.mk to
  41.     $(INIT)/dmake.ini which better fits into DOS and OS/2 naming conventions
  42.     Changes were made in startup.h and ruletab.c. (Usually people have the
  43.     environment variable INIT pointing to a directory with the TOOLS.INI
  44.     file for the MS editor and its my favourite place for all init files,)
  45.  
  46. 10. The MAXPROCESSLIMIT/MAXPROCESS definitions had to be changed in
  47.     ruletab.c. :-)
  48.  
  49. 11. Altough the getswitchar() function can be used to get the actual
  50.     setting from DOS, I hardcoded '-' because I (and many others) ALWAYS
  51.     use that character for switches (who uses / ?) independent of the
  52.     actual switchar setting.
  53.  
  54. These patches (except 3.) are found in dmake.dif (context diff's).
  55. The OS/2 version of runargv.c is in os2/runargv.c.
  56.  
  57. I did not use dmake to make itself, but my compiler shell CS :-)
  58. Therefore I did not update the makefile.mk. The script dmake.cs is for
  59. the original DOS version, dmake2.cs is for the parallel OS/2 version.
  60. dmake.bad and dmake.def are used by this script.
  61.  
  62. dmake.exe is the final OS/2 parallel version (compact model). It runs
  63. under MS-DOS too, but sequential only, of course. By default, it is
  64. sequential under OS/2 too, the -P# has to be used to enable the parallel
  65. making.
  66.  
  67. Now the test results:
  68.  
  69. I used dmake to compile my DOS and OS/2 port of GNU tar (thats the only
  70. non-trivial program I have a functioning makefile for, for all others, I
  71. use CS only :-).
  72.  
  73. Sequential dmake:                       232.0 seconds
  74.  
  75. dmake with 2 processes:                 213.0 seconds
  76. dmake with 4 processes:                 209.0 seconds
  77. dmake with 8 processes:                 203.5 seconds
  78. dmake with 16 processes:                207.5 seconds
  79.  
  80. I used an '386 with 24 MHz and 8 MB RAM, running IBM OS/2 1.2 configured
  81. with 1 MB disk cache and 1 MB RAM-disk. All processes, even the 16 ones
  82. in the last test fit into this memory, no swapping occurres.
  83. I have a RLL disk with 25ms access time and 660 kB per second transfer rate.
  84.  
  85. It seems that about 8-10 processes are the best for this machine.
  86. The saving was about 13% of the time in the 8-process case.
  87. Maybe that I test this on a VAX under Ultrix sometimes to compare the
  88. results.
  89.  
  90. Kai Uwe Rommel
  91. rommel@lan.informatik.tu-muenchen.dbp.de
  92.