Sponsored Content
Top Forums Shell Programming and Scripting Implement parallel processing Post 302834537 by Don Cragun on Friday 19th of July 2013 07:03:33 AM
Old 07-19-2013
Quote:
Originally Posted by kumarjt
No , loops would make the execution sequential, because unless the process within a SINGLE loop ietration completes , the control cannot be passed back to the shell prompt for the next iteration processing to commence.

What I want is :
Start instance 1 , immediately start instance 2 and do not wait for the exit status of instance 1 .
SIMULTANEOUS PROCESSING . Not sequential .
Similar to the "tee" command , process input and write to a file at one go.

Thanks
Kumarjit.
Is this a homework assignment? If not, please explain why you need to do this.

If you're going to ignore our suggestions without understanding what was said, we'll quickly decide to spend our time working with people who will pay attention to our suggestions.

Starting a process in the background (AKA starting a process asynchronously) in a loop will allow you to run x instances simultaneously if you go through the loop x times.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

How to do parallel processing??

Hi All, I am working on solaris 8 sparc machine with 2 cpu. I am trying to run my application which generates files. I run multiple instance of the application, but the results don't seem to show as if it were runing parallely. When i run the application once it takes 12 secs to generate a... (1 Reply)
Discussion started by: zing
1 Replies

2. Shell Programming and Scripting

parallel processing

Hi I want to run two shell script files parallely. These two scripts are interacting with the database. can any body help on this Pls Regards Audippa naidu.M (3 Replies)
Discussion started by: audippa
3 Replies

3. Shell Programming and Scripting

Need Help With Parallel Processing

Hi I am looking for some kind of feature in unix that will help me write a script that can invoke multiple processes in parallel. And make sure that the multiple parallel processes complete successfully before I proceed to the next step. Someone suggested something called timespid or... (6 Replies)
Discussion started by: imnewtothis23
6 Replies

4. Shell Programming and Scripting

parallel processing

hi i am preparing a set of batches for a set of files sequentially There is a folder /xyz where all the files reside now all the files starting with 01 - will be appended for one below other to form a batch batch01 then all the files starting with 02 - will be appended for one below other to... (7 Replies)
Discussion started by: mad_man12
7 Replies

5. Shell Programming and Scripting

How to make parallel processing rather than serial processing ??

Hello everybody, I have a little problem with one of my program. I made a plugin for collectd (a stats collector for my servers) but I have a problem to make it run in parallel. My program gathers stats from logs, so it needs to run in background waiting for any new lines added in the log... (0 Replies)
Discussion started by: Samb95
0 Replies

6. Shell Programming and Scripting

PARALLEL PROCESSING IN PERL

HI All, I have scenerio where I need to call sub modules through for loop for (i=0; i<30 ;i++) { .. .. .. subroutine 1; subroutine 2; } I want this to be run in parallel process1 { ... ... subroutine 1; subroutine 2; (0 Replies)
Discussion started by: gvk25
0 Replies

7. Shell Programming and Scripting

Parallel processing in bash?

Hi Say I am interested in processing a big data set over shell, and each process individually takes a long time, but many such processes can be pipe-lined, is there a way to do this automatically or efficiently in shell? For example consider pinging a list addresses upto 5 times each. Of... (5 Replies)
Discussion started by: jamie_123
5 Replies

8. Programming

Parallel processing pthread

Need urgent help on thread: the goal here is the separtemask will take each image and separate different contours and for each contour in the image it will call handleobject thread. So every for loop will call the handeobject thread. However, object index variable needs to be passed in each... (0 Replies)
Discussion started by: temursalin
0 Replies

9. Shell Programming and Scripting

Parallel processing - continued

Hi, I am taking up the cue from where I was left in my earlier post ( link given below ) https://www.unix.com/shell-programming-scripting/231107-implement-parallel-processing.html I actually wanted to know the significance of using the Unix "wait" , which returns the control from background to... (3 Replies)
Discussion started by: kumarjt
3 Replies

10. Shell Programming and Scripting

Parallel processing

I have 10,000 + files, each of which I need to zip using bzip2. Is ti possible to use bash to create 8 parallel streams sending a new file to be processed from the list when one of the others has finished? (1 Reply)
Discussion started by: garethsays
1 Replies
libmlib_mt(3LIB)						Interface Libraries						  libmlib_mt(3LIB)

NAME
libmlib_mt - multi-threaded mediaLib SYNOPSIS
cc [ flag... ] file... -lmlib_mt -lmlib [ library... ] #include <mlib.h> DESCRIPTION
Interfaces in this library provide functions for multimedia processing. Multi-threaded (MT) mediaLib is a software layer developed on top of mediaLib using OpenMP. When it is used with a large data set on a multi-processor system, MT mediaLib will partition data into subsets and process the subsets in parallel, thus greatly improving performance of applications that use mediaLib. INTERFACES
The shared object libmlib_mt.so.2 provides the same public interfaces as those defined in libmlib(3LIB). See Intro(3) for additional infor- mation on shared object interfaces. USAGE
There are two ways to use MT mediaLib. 1. Pre-load a multi-threaded mediaLib library during runtime by setting the LD_PRELOAD environment variable as follows before starting your application, in Bourne/Korn shell: LD_PRELOAD=libmlib_mt.so export LD_PRELOAD or in C shell: setenv LD_PRELOAD libmlib_mt.so In this way, you can take advantage of MT mediaLib without rebuilding your application. 2. Link your application with a multi-threaded mediaLib library directly as shown under SYNOPSIS. In this way, an MT mediaLib library is always used whenever your application is started. The parallelization of MT mediaLib is controlled, in part, by the PARALLEL environment variable. You can change its setting to adjust the degree of parallelization before starting your application, in Bourne/Korn shell: PARALLEL=n export PARALLEL or in C shell: setenv PARALLEL n where n is a positive integer for number of threads. Note that other factors also affect the degree of parallelization in MT mediaLib. FILES
/usr/lib/libmlib_mt.so.2 shared object /usr/lib/64/libmlib_mt.so.2 64-bit shared object ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWmlibt | +-----------------------------+-----------------------------+ |MT-Level |MT-Safe | +-----------------------------+-----------------------------+ SEE ALSO
Intro(3), libmlib(3LIB), attributes(5) mediaLib User's Manual SunOS 5.11 15 Oct 2007 libmlib_mt(3LIB)
All times are GMT -4. The time now is 02:43 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy