Thread: pipelining threads

  1. #1
    Registered User
    Join Date
    Oct 2002

    pipelining threads

    hi all,
    i want to create a pipeline in solaris using c POSIX. i have found lot of theories on what is a pipeline on the net but couldn't find any examples or even guide to implementing it.
    i would appreciate it very much if someone could guide me to some docs or give me small examples. and the term concurrent is confusing me. is it the same as pipelining?
    thanks in advance,

  2. #2
    Registered User
    Join Date
    Oct 2002
    can anyone help me please....?

  3. #3
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    The edge of the known universe
    Do you understand the basic use of
    - fork
    - execl
    - pipe
    - dup

    Because if you don't, it's going to take one hell of an explanation.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  4. #4
    Registered User
    Join Date
    Oct 2002
    thank you for the response. i was despairing of any reply...

    i thought fork was for processes. i need to use threads - pthread library.
    i know how to create threads, locks(mutex) but not pipelining. i can call sleep on a thread in order to give others a chance but it sleeps.
    so, i'm looking for some guidance toward pipelining. i'm new to threads but i can pick up quickly. please help me.

  5. #5
    still a n00b Jaguar's Avatar
    Join Date
    Jun 2002
    >> i have found lot of theories on what is a pipeline on the net but couldn't find any examples

    does this help?
    slackware 10.0; kernel 2.6.7
    gcc 3.4.0; glibc 2.3.2; vim editor
    migrating to freebsd 5.4

  6. #6
    Registered User Codeplug's Avatar
    Join Date
    Mar 2003
    A pipeline using threads is an abstract concept. It's not something you simply create using a function call or anything like that.
    It refers to parallel computing strategy for solving a problem. And not all parallel computing problems are best suited using a pipeline strategy.
    The implementation of a pipeline strategy is highly dependent on the problem being solved.

    So what is a pipeline strategy?

    The most common analogy is a factory assembly line where each station on the assembly line is responsible for a particular job.
    In this analogy, each station is represented by one or more threads. When a thread at station A is complete, it passes control to the thread(s) at station B, and so on.

    If you explain the problem your trying to solve, perhaps we can guide you towards an appropriate pipeline strategy for solving that problem. However, implementing a pipeline strategy requires a good deal of knowledge of multi-threaded programming and thread synchronization. Just creating threads and locks is one thing, but using them effectively is something else entirely.


Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 5
    Last Post: 10-17-2008, 11:28 AM
  2. Yet another n00b in pthreads ...
    By dimis in forum C++ Programming
    Replies: 14
    Last Post: 04-07-2008, 12:43 AM
  3. Classes and Threads
    By Halloko in forum Windows Programming
    Replies: 9
    Last Post: 10-23-2005, 05:27 AM
  4. problem with win32 threads
    By pdmarshall in forum C++ Programming
    Replies: 6
    Last Post: 07-29-2004, 02:39 PM
  5. Block and wake up certain threads
    By Spark in forum C Programming
    Replies: 9
    Last Post: 06-01-2002, 03:39 AM