By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
449,017 Members | 1,072 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 449,017 IT Pros & Developers. It's quick & easy.

process management

P: n/a
Hello to everybody:

I'm trying to get some information about "process management".
Let's explain a little... I want to write some code that allows me to
execute some "aplications" and collect the data they produced.
This apllicationis a kind of "client" that must work in more that one
SO (for example *NIX, Windows98, Win2000).
So my question is about what kind of "managemet" of this proccess I can
do, and how to start and "monitor" these process over the diferent
platforms.
Iniciatly I want to write the code in C, but for now I'm only trying to
collect some information.

Any kind of information or personal experience while be good (very goof
:) ).
Maybe some library that make this simple, or maybe some information to
understand how I can access the process information from C.

Thank in advance...
I'll be here for a long time...


Nuño I.G.

Jan 16 '07 #1
Share this Question
Share on Google+
8 Replies


P: n/a
Hi,

I'm not very sure what your intention is.
If you are talking about "Process Management" in OS terms then how
process management will be done is determined by the operating system.
You would have little or no cotrol over it.

But if you want several applications running on different machines and
one application controling them or collecting their output and
processing it, then I guess you can take a look at MPI (Message passing
interface) library.

You can achivee above goal wihout using a library as well. All you need
to do is to write your "client" applications
such that they listen network and you controller application can send
commands to them through network.

please let us know exactly what you are trying to do and we will be
able to provide you a better answer.

cheers
Rohin Koul

Nuño I.G wrote:
Hello to everybody:

I'm trying to get some information about "process management".
Let's explain a little... I want to write some code that allows me to
execute some "aplications" and collect the data they produced.
This apllicationis a kind of "client" that must work in more that one
SO (for example *NIX, Windows98, Win2000).
So my question is about what kind of "managemet" of this proccess I can
do, and how to start and "monitor" these process over the diferent
platforms.
Iniciatly I want to write the code in C, but for now I'm only trying to
collect some information.

Any kind of information or personal experience while be good (very goof
:) ).
Maybe some library that make this simple, or maybe some information to
understand how I can access the process information from C.

Thank in advance...
I'll be here for a long time...


Nuño I.G.
Jan 16 '07 #2

P: n/a
Nuño I.G wrote:
Hello to everybody:

I'm trying to get some information about "process management".
Let's explain a little... I want to write some code that allows me to
execute some "aplications" and collect the data they produced.
This apllicationis a kind of "client" that must work in more that one
SO (for example *NIX, Windows98, Win2000).
So my question is about what kind of "managemet" of this proccess I can
do, and how to start and "monitor" these process over the diferent
platforms.
Iniciatly I want to write the code in C, but for now I'm only trying to
collect some information.

Any kind of information or personal experience while be good (very goof
:) ).
Maybe some library that make this simple, or maybe some information to
understand how I can access the process information from C.

Thank in advance...
I'll be here for a long time...
This group discusses the C langauge as defined by ISO, which, by
itself, has no process and job control routines. If you'll only be
targetting the Windows family, then please post to
comp.os.ms-windows.programmer.win32, or a similar group. Also browse
Microsoft excellent documentation on msdn.com. If your application is
meant to be cross platform, then the POSIX process and job control
routines are probably the best way to go. Please post to a group like
comp.unix.programmer or comp.programming.

Jan 16 '07 #3

P: n/a
El 16 Jan 2007 05:31:49 -0800
"yeti" <ro********@gmail.comescribió:
Hi,

I'm not very sure what your intention is.
If you are talking about "Process Management" in OS terms then how
process management will be done is determined by the operating system.
You would have little or no cotrol over it.

But if you want several applications running on different machines and
one application controling them or collecting their output and
processing it, then I guess you can take a look at MPI (Message
passing interface) library.

You can achivee above goal wihout using a library as well. All you
need to do is to write your "client" applications
such that they listen network and you controller application can send
commands to them through network.

please let us know exactly what you are trying to do and we will be
able to provide you a better answer.

Thanks.
I'm going to read some about MPI. And then maybe I can redefine my
question.
What i need is to lauch some small programs, from the application , and
try to keep informed about the execution. The programs does not have any
relation between them and I can't access to it's source. What I mean is
that I only have the binaries, the paremeters it need , and the output
I must wait for.
Usefull information should be the "Execution time", "memory consumed",
, "state of execution", and "exit signal" (if more information
can be collected .... :) ).
And this porgram must run in more than one platform (included diferent
OS).
Thanks again...I will try to start "playing" with source tomorrow.

cheers
Rohin Koul

Nuño I.G wrote:
Hello to everybody:

I'm trying to get some information about "process management".
Let's explain a little... I want to write some code that allows me
to execute some "aplications" and collect the data they produced.
This apllicationis a kind of "client" that must work in more that
one SO (for example *NIX, Windows98, Win2000).
So my question is about what kind of "managemet" of this proccess I
can do, and how to start and "monitor" these process over the
diferent platforms.
Iniciatly I want to write the code in C, but for now I'm only trying
to collect some information.

Any kind of information or personal experience while be good (very
goof :) ).
Maybe some library that make this simple, or maybe some information
to understand how I can access the process information from C.

Thank in advance...
I'll be here for a long time...




Nuño I.G.
Jan 16 '07 #4

P: n/a
El 16 Jan 2007 06:46:47 -0800
"santosh" <sa*********@gmail.comescribió:
Nuño I.G wrote:
Hello to everybody:

I'm trying to get some information about "process management".
Let's explain a little... I want to write some code that allows me
to execute some "aplications" and collect the data they produced.
This apllicationis a kind of "client" that must work in more that
one SO (for example *NIX, Windows98, Win2000).
So my question is about what kind of "managemet" of this proccess I
can do, and how to start and "monitor" these process over the
diferent platforms.
Iniciatly I want to write the code in C, but for now I'm only trying
to collect some information.

Any kind of information or personal experience while be good (very
goof :) ).
Maybe some library that make this simple, or maybe some information
to understand how I can access the process information from C.

Thank in advance...
I'll be here for a long time...
This group discusses the C langauge as defined by ISO, which, by
itself, has no process and job control routines. If you'll only be
targetting the Windows family, then please post to
comp.os.ms-windows.programmer.win32, or a similar group. Also browse
Microsoft excellent documentation on msdn.com. If your application is
meant to be cross platform, then the POSIX process and job control
routines are probably the best way to go. Please post to a group like
comp.unix.programmer or comp.programming.
Thanks I will try there.
Sorry if this is an OFFTOPI here :).
I need an entry point for this work :).


Jan 16 '07 #5

P: n/a
In article <20*********************@localhost.localdomain>,
=?ISO-8859-15?B?TnXxbw==?= I.G <nu***********@gmail.comwrote:
>El 16 Jan 2007 05:31:49 -0800
>And then maybe I can redefine my question.
What i need is to lauch some small programs, from the application , and
try to keep informed about the execution. The programs does not have any
relation between them and I can't access to it's source. What I mean is
that I only have the binaries, the paremeters it need , and the output
I must wait for.
Usefull information should be the "Execution time", "memory consumed",
, "state of execution", and "exit signal" (if more information
can be collected .... :) ).
And this porgram must run in more than one platform (included diferent
OS).
The C standard itself doesn't admit that more than one process
might exist. The closest it comes is the system() function,
which the standard says has "implimentation defined" behaviour
(with the sole exception that there is a portable way to check
to see if the implimentation provides a command interpreter at all.)
So whatever you come up with will have to rely upon behaviours
not defined by the C language itself.

Is there a well-accepted fairly portable mechanism to do what
you want? Unfortunately not: you really will find that you will
have to use non-portable system-dependant calls.

The notion of "Execution time" gets fuzzy when you have a
system able to run multiple processes. Do you mean the time
that the process has actually been in control of the CPU? Do
you include the time that the operating system has been
executing something on behalf of the process (such as doing disk I/O) ?
Are you looking for the "clock time" since the process started,
even though some other process completely might have been hogging the CPU?
If the system has multiple processors or multiple cores, do you want
to count according to the number of active processors or cores devoted
to the process? And if the process isn't compiled to take advantage
of multiple cores and the extra cores are sitting idle because
the OS doesn't know how to schedule other processes on the extra
cores, then should the process be charged for the "opportunity cost"
of those cores sitting idle?

Similarily, "memory consumed" gets messy to characterize when you
take into account that the system only needs one copy in memory of
a shared library or DLL -- should each shared library or DLL be
counted in full against the memory consumed, or should the OS
periodically check how many processes happen to be using a particular
shared library or DLL right then, and "charge" each process for
an equal fraction of the memory occupied by the shared library or DLL?

"State of execution" can get complex when multiple threads or
multiple processors or multiple cores are involved.

The meaning of the various "Exit signal" is OS dependant -- signal #19
on Windows might be different than signal #19 on a Unix system; the
POSIX standard defines some standard signals, but also provides for
system-dependant signals, and those system-dependant signals *do*
vary between Unix-like OS's (and between the software versions
of any one Unix-like OS.) And you have to do special things in order
to get a POSIX environment on Windows; if I recall correctly
(and I'm not an expert on this), the POSIX subsystem is provided
with Windows XP Pro, but not provided with Windows XP.
There's an old joke that comes to mind for your situation:

Q: How do you get down off of the back of an elephant?
A: You don't: you get down off of the back of a duck; it's so much safer.
--
If you lie to the compiler, it will get its revenge. -- Henry Spencer
Jan 16 '07 #6

P: n/a
yeti wrote:
Hi,

Please don't top-post. Your replies belong following or interspersed
with properly trimmed quotes. See the majority of other posts in the
newsgroup, or:
<http://www.caliburn.nl/topposting.html>
Jan 16 '07 #7

P: n/a
"Nuño I.G" <nu***********@gmail.comwrote in message
news:20*********************@localhost.localdomain ...
>Hello to everybody:

I'm trying to get some information about "process management".
Let's explain a little... I want to write some code that allows me to
execute some "aplications" and collect the data they produced.
This apllicationis a kind of "client" that must work in more that one
SO (for example *NIX, Windows98, Win2000).
So my question is about what kind of "managemet" of this proccess I can
do, and how to start and "monitor" these process over the diferent
platforms.
Iniciatly I want to write the code in C, but for now I'm only trying to
collect some information.
There are at least two scripting languages (Tcl / Tk and PHP) that have
versions that run both on Unix-like systems and on Windows. Both of those
scripting languages have functions like exec() that spawn a process, provide
it input, and catch its output.

Locating the source code -- which will be compileable for both platforms --
might save you a lot of work in investigating best approaches and IPC
mechanisms specific to the operating system.

PHP is at www.php.net, and I'm sure you'd be able to locate Tcl/Tk in no
time.

--
David T. Ashley (dt*@e3ft.com)
http://www.e3ft.com (Consulting Home Page)
http://www.dtashley.com (Personal Home Page)
http://gpl.e3ft.com (GPL Publications and Projects)
Jan 18 '07 #8

P: n/a
David T. Ashley wrote:
"Nuño I.G" <nu***********@gmail.comwrote in message
news:20*********************@localhost.localdomain ...
Hello to everybody:

I'm trying to get some information about "process management".
Let's explain a little... I want to write some code that allows me to
execute some "aplications" and collect the data they produced.
This apllicationis a kind of "client" that must work in more that one
SO (for example *NIX, Windows98, Win2000).
So my question is about what kind of "managemet" of this proccess I can
do, and how to start and "monitor" these process over the diferent
platforms.
Iniciatly I want to write the code in C, but for now I'm only trying to
collect some information.

There are at least two scripting languages (Tcl / Tk and PHP) that have
versions that run both on Unix-like systems and on Windows. Both of those
scripting languages have functions like exec() that spawn a process, provide
it input, and catch its output.
And a host of others like Python, Perl, Java etc. In fact most high
level languages provide methods for spawning processes and redirecting
the I/O.

Jan 18 '07 #9

This discussion thread is closed

Replies have been disabled for this discussion.