|
Co-processes - Part II - Introduction
|
Understanding
what background processes are (see last
week's tip), and how to create
them should make it easier for you to
grasp the concept of co-processes.
Co-processes, sometimes called
co-routines, consist of two or more
processes programmed to run
simultaneously, and typically communicate
with each other. The parent program
(script) will start a command or program
in the background that is able to have
two-way communication with it. In
more technical terms, the standard input
and output of the background program is
connected to the parent program with a
pipe. There may also be scenarios
when you want more than one background
program communicating with the parent
program.
Co-processes are useful if you want to
provide an interface to existing/legacy
programs, but even more important, it is
possible to improve the performance of a
program by using co-processes.
The next part of this series will
introduce the syntax for starting and
communicating with a co-process, and will
also include a simple example to
demonstrate the concept.
|
|
|
|
Learn
more...
If you are new to the UNIX or Linux
operating system and would like to learn
more, you may want to consider
registering for LiveFire Labs' UNIX
and Linux Operating System Fundamentals
online training course.
If you already have a solid grasp of the
fundamentals but would like to learn more
about the Korn shell and basic and
advanced shell scripting, taking our Korn
Shell Scripting course will be
beneficial to you.
Our
innovative hands-on training model allows
you to learn
UNIX by completing hands-on
exercises on real servers in our Internet
Lab.
More
Tips...
· Popular
UNIX Tips from the Past
|
|
|
|
|
|
|
Receive
the UNIX Tip, Trick, or Shell Script of the
Week by Email
|
|
|