Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: thread clarifications.....!!!  (Read 3407 times)

0 Members and 1 Guest are viewing this topic.

tiwari1988

    Topic Starter


    Greenhorn

    thread clarifications.....!!!
    « on: May 09, 2009, 01:20:07 AM »
    I am a CS bachelor and am reading OS. I have a doubt regarding the processes and threads.....The theoretical conceptions are clear by far.But i haven't received any practical and visual clarification of a thread.I can see how processes exist in a computer while an OS is running but concerning threads am really doubtful.


    Could anybody plzzz clear my quest by showing where actually threads exist in a process and whether do threads keep running even when the process is eliminated....actually i need a visual and a practical picture of threads and processes....any help would be highly acknowledged



    nishant tiwari

    banjo67xxx



      Beginner

      Thanked: 4
      • Certifications: List
      • Computer: Specs
      • Experience: Guru
      • OS: Linux variant
      Re: thread clarifications.....!!!
      « Reply #1 on: May 09, 2009, 05:46:12 PM »
      AFAIK a thread is part of a process. If a process is killed then all threads associated with that process die.

      An example of where you'd use processes would be for the bash shell. Each time you process a command, you'd fork a sub-process the execute it.

      An example of where you'd use threads would be for software raid driver (esp during parity recovery). You could lauch a whole load of threads to read the disk blocks asynchronously, and then whichever stripe came back first you could reconstruct the missing data from parity, and if the last read to complete was for the first block then you'd only have one parity calculation left to compute, because the other threads had already completed everything else whilst this thread was waiting.