1.

Solve : Multiple processes in ms dos?

Answer»

Hello every one

can any one tells me how to handle multiple PROCESSES in ms dos shell?

I invoke the multiple process throught any other file like make -j .In this case multiple process reading from same file and it cause an error and terminate the execution.Quote

can any one tells me how to handle multiple processes in ms dos shell

How are you accomplishing this? Both the cmd and command shell programs are single threaded. Seems more likely you have multiple shell programs, each running a process that requires the same file.

You can develop a batch file to run your tasks sequentially and prevent the file conflicts.



Quote
Seems more likely you have multiple shell programs, each running a process that requires the same file.

I invoke the processes by the help of make -j .

by the way make -j1 , solves the problem in some limites.For a very brief time I thought you had managed to get MS Dos to multitask. You're certainly not using an MS Dos shell, I suspect you are using XP Cmd.exe. The GNU Make manual says it all...

Quote
GNU `make' knows how to execute several commands at once. Normally,
`make' will execute only one command at a time, waiting for it to
finish before executing the next. However, the `-j' or `--jobs' option
tells `make' to execute many commands simultaneously.

On MS-DOS, the `-j' option has no effect, since that system doesn't
support multi-processing.


One UNPLEASANT consequence of running several commands
simultaneously is that output generated by the commands appears
whenever each command sends it, so messages from different commands may
be interspersed.
Quote
You're certainly not using an MS Dos shell, I suspect you are using XP Cmd.exe.

correct I m using xp amd.exe, so is multiprocessing wroking on xp cmd.exe? but not on ms dos?

You will understand that cmd.exe in XP is not MS-Dos or any other Dos version. Cmd.exe is not Dos, it is a dos-emulator program which runs in the Windows environment. What you see when you start cmd.exe is a window. Although Cmd.exe will accept commands which look like Dos commands they are not Dos commands but Windows XP command line commands which are shown here...

Multiprocessing (multitasking) is not allowed in either the XP Command Processor or in MS-Dos. However multiple XP Command Processor windows can be opened.

GNU Make can process more than one command simultaneously but this processing is being done by GNU Make not by Dos or the Dos emulator.

Start cmd.exe and enter the command VER - you will probably see a display such as:Quote
Microsoft Windows XP [Version 5.1.2600]
This is the Windows XP version being used. If you enter VER whilst running Dos you will see the Dos version being used.

Hope this helps.I don't think the POSIX subsystem implemented by XP has the fork() method, which is likely used by GNU make for this feature.Quote
GNU Make can process more than one command simultaneously but this processing is being done by GNU Make not by Dos or the Dos emulator.

Dusty , Yes its true , now I try to USE win bash shell for using multitasking in win32 .

Thanks for ur help and KNOWLADGE sharing.


Discussion

No Comment Found