Sponsored Content
Top Forums Programming Parallel Execution of Programs Post 302391599 by pludi on Tuesday 2nd of February 2010 01:06:22 AM
Old 02-02-2010
Whoops, meant "commands". Corrected that.

And yes, it's classical fork/exec. However, as some posters expressed a need for a program to do just that (eg run multiple gzips in parallel without a CPU idling) I thought I'd try to fill that need.
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Parallel Execution

Hello, I wish to run parallel process forked from one script. Currently I doing is submit them in background. For example: --------------------------------------------------------------- #!/usr/bin/ksh process1 & process2 & process3 & ..... ..... #here I check for completion of... (4 Replies)
Discussion started by: RishiPahuja
4 Replies

2. AIX

Make : parallel execution

Hi, Is there any way to run parallel jobs using make command? I am using non-GNU make utility on AIX 4.3. I want to run 2 jobs symultaneously using make utility. Thanks. Suman (0 Replies)
Discussion started by: suman_jakkula
0 Replies

3. High Performance Computing

Parallel Execution on Multiple System

Hi All, I am working on a project where I need to execute set of arguments (around 500) on a Simulator. If I execute this on one linux (RedHat 8.0) machine it will approximately takes 2~3 days. Since I am having more linux machines am thinking of executing these on different machines in... (7 Replies)
Discussion started by: 123an
7 Replies

4. Shell Programming and Scripting

Parallel Job Execution

Hi All, At present I am using a UNIX Script which is running a set of JOBS. These JOBS are to be repeated for 20 times, means the same set of JOBS are repeated by just passing different arguments (From 1 to 20). Is there any way by which I can execute them parallel? At present its all... (4 Replies)
Discussion started by: Prashantckc
4 Replies

5. Shell Programming and Scripting

Conditional execution and parallel jobs

how can i process jobs parallel with conditions below. Script1.ksh Script2.ksh Script3.ksh Script4.ksh Script5.ksh Script6.ksh Script7.ksh Script8.ksh Script9.ksh Script10.ksh After successful completion of Script1.ksh I need to run Script7.ksh. After successful... (4 Replies)
Discussion started by: ford2020
4 Replies

6. Shell Programming and Scripting

Parallel execution of script not syncronize

I am haveing 2 scripts, 1st script calls 2ed script for each parameter.(parameters are kept in a different txt file) 1st script for x in `cat Export_Tables_List.txt` do sh Exp_Table.sh $x & done echo -e "1) following tables are successfully exported : \n" > temp cat... (1 Reply)
Discussion started by: sbmk_design
1 Replies

7. Shell Programming and Scripting

What is the parallel execution command available in Ubuntu Linux?

Hi, I am using Ubuntu 10.04 LTS 32-bit. I would like to execute a command in two or more servers (multiple remote hosts) in parallel. The commands "shmux" or "on" are not available in Ubuntu. Could anyone tell me what other equivalent commands available in Ubuntu to accomplish this task? (1 Reply)
Discussion started by: royalibrahim
1 Replies

8. UNIX for Advanced & Expert Users

Parallel Execution of Command

Hi All, We have a table that has to store around 80-100 million records. The table is partitioned by a column called Market Code. There are 30 partitions each corresponding to one MRKT_CD. The source of this table is a join between 3-4 other tables. We are loading this table through SQLPLUS... (2 Replies)
Discussion started by: jerome_rajan
2 Replies

9. Shell Programming and Scripting

How to make parallel execution on folder ?

I have few very huge files ~ 2 Billion rows of 130 column(CDR data) in a folder, I have written shell script need to read on each file in a folder and will create a new files based on some logic. But problem is it's taking time to create a new file due to the size , So i dont want to corrupt... (6 Replies)
Discussion started by: rspwilliam
6 Replies
pcsample(2)                                                        System Calls                                                        pcsample(2)

NAME
pcsample - program execution time profile SYNOPSIS
#include <pcsample.h> long pcsample(uintptr_t samples[], long nsamples); DESCRIPTION
The pcsample() function provides CPU-use statistics by profiling the amount of CPU time expended by a program. For profiling dynamically-linked programs and 64-bit programs, it is superior to the profil(2) function, which assumes that the entire pro- gram is contained in a small, contiguous segment of the address space, divides this segment into "bins", and on each clock tick increments the counter in the bin where the program is currently executing. With shared libraries creating discontinuous program segments spread throughout the address space, and with 64-bit address spaces so large that the size of "bins" would be measured in megabytes, the profil() function is of limited value. The pcsample() function is passed an array samples containing nsamples pointer-sized elements. During program execution, the kernel samples the program counter of the process, storing unadulterated values in the array on each clock tick. The kernel stops writing to the array when it is full, which occurs after nsamples / HZ seconds of process virtual time. The HZ value is obtained by invoking the call sysconf(_SC_CLK_TCK). See sysconf(3C). The sampling can be stopped by a subsequent call to pcsample() with the nsamples argument set to 0. Like profil(), sampling continues across a call to fork(2), but is disabled by a call to one of the exec family of functions (see exec(2)). It is also disabled if an update of the samples[] array causes a memory fault. RETURN VALUES
The pcsample() function always returns 0 the first time it is called. On subsequent calls, it returns the number of samples that were stored during the previous invocation. If nsamples is invalid, it returns -1 and sets errno to indicate the error. ERRORS
The pcsample() function will fail if: EINVAL The value of nsamples is not valid. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |MT-Level |Async-Signal-Safe | +-----------------------------+-----------------------------+ |Interface Stability |Stable | +-----------------------------+-----------------------------+ SEE ALSO
exec(2), fork(2), profil(2), sysconf(3C), attributes(5) SunOS 5.10 10 Mar 1998 pcsample(2)
All times are GMT -4. The time now is 02:56 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy