Processes V Threads

bridged with qdn.public.qnxrtp.newuser
Post Reply
RonanK

Processes V Threads

Post by RonanK » Fri Aug 08, 2003 3:33 pm

Hi,

Thanks to Rennie and Igor for replying to my post. I now have a much better
idea of what I need to do. Doubtlessly I will still encounter many problems
when I start converting my programs however!
What books would you recommend Igor? I am used to writing C code but have
never needed to split it in to processes and threads before (i.e. all non
real-time)

Thanks again,

RonanK

Bill Caroselli

Re: Processes V Threads

Post by Bill Caroselli » Fri Aug 08, 2003 5:59 pm

RonanK <ronan.kennelly@nuigalway.ie> wrote:
R > Hi,

R > Thanks to Rennie and Igor for replying to my post. I now have a much better
R > idea of what I need to do. Doubtlessly I will still encounter many problems
R > when I start converting my programs however!
R > What books would you recommend Igor? I am used to writing C code but have
R > never needed to split it in to processes and threads before (i.e. all non
R > real-time)

R > Thanks again,

R > RonanK

If you can accomplish what you need to accomplish with a single
threaded application, then don't complicate your life needlessly. Code
your application as a single threaded application.

If your *system* requires that several processes occur somewhat
concurrently, then your still living in the single threaded world.
Write two seperate processes and let them both run concurrently.
NOTE: putting a '&' after a command on the command line runs the
command in the background so that you have a new command line prompt
to enter another command.

The only time you really *should* write a multi-threaded application
is when you realize that multiple things need to happen at the same
time AND in a tightly coupled environment. I.E. they are sharing
resourses like a common memory buffer.

I.E. If you need something to be multi-threaded, you'll know it!


--
Bill Caroselli -- Q-TPS Consulting
1-(626) 824-7983
qtps@earthlink.net

Igor Kovalenko

Re: Processes V Threads

Post by Igor Kovalenko » Fri Aug 08, 2003 6:58 pm

"Programming with Pthreads" of O'Reilly is very good book. Or just search by
the subject, there are more.

-- igor

"RonanK" <ronan.kennelly@nuigalway.ie> wrote in message
news:bh0f9o$gon$1@inn.qnx.com...
Hi,

Thanks to Rennie and Igor for replying to my post. I now have a much
better
idea of what I need to do. Doubtlessly I will still encounter many
problems
when I start converting my programs however!
What books would you recommend Igor? I am used to writing C code but have
never needed to split it in to processes and threads before (i.e. all non
real-time)

Thanks again,

RonanK

Rennie Allen

Re: Processes V Threads

Post by Rennie Allen » Fri Aug 08, 2003 9:23 pm

Igor Kovalenko wrote:
"Programming with Pthreads" of O'Reilly is very good book. Or just search by
the subject, there are more.
I agree; another good book is "Programming with POSIX Threads" by David
Butenhof ISBN 0-201-63392-2.

Rennie

Post Reply

Return to “qdn.public.qnxrtp.newuser”