Threads and Processes

This is a discussion on Threads and Processes within the Tech Board forums, part of the Community Boards category; I just started learning about multiple threads and multiple processes. I have the basics down, but I haven't been able ...

  1. #1
    Registered User Draco's Avatar
    Join Date
    Apr 2002
    Posts
    463

    Threads and Processes

    I just started learning about multiple threads and multiple processes. I have the basics down, but I haven't been able to find anything that explains the details yet. I'm wondering what some of the more specific differences between the two, and the reasons/situations that would make you choose to use a new process instead of just a new thread.

  2. #2
    Registered User
    Join Date
    Aug 2003
    Posts
    51
    although my knowledge in this area is limited i do know some stuff.

    A process is a program running. But a thread is a part of a programm running.

    A thread is like a cut down version of a process.

    Because a process is an entire program running.

    But a thread is only a part of a program running.

    i hope im making sense here.

    When u create a new process you are running another program.

    But if u run 2 threads, they may come from the same program. Thats y u hear of some programs are able to run multiple threads. u are able to run a single process on 2 cpu's simultaneously through running a thread on each cpu from that process.

  3. #3
    Registered User
    Join Date
    Jul 2003
    Posts
    15
    A Process is a program in execution.

    If a process has a single thread, it is only able to preform one task at a time. If the process has multiple threads, it would be able to preform more then one task at a time.

    An example of a process would be, a word processor. An example of a thread within the word processor might be a spell checker. If the process was single threaded, you would not be able to run the spell checker and type words into the document at the same time. But if the process was multi-threaded you would be able to.

    Studying this in Computer Operating Systems right now ^^;
    (Reference: Operating System Concepts, by Silberschatz, Galvin and Gagne)

  4. #4
    It's full of stars adrianxw's Avatar
    Join Date
    Aug 2001
    Posts
    4,831
    A process has an address space. Multiple processes, multiple address spaces. A global variable in one process is not accessible from the other processes.

    Multiple threads run within a process and share the same address space. A global variable in a multithreaded process is available to all threads running within the process.

    For example... there are many differences.
    Wave upon wave of demented avengers march cheerfully out of obscurity unto the dream.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. threads and Real-time processes
    By inhahe in forum Windows Programming
    Replies: 5
    Last Post: 05-14-2008, 05:17 PM
  2. Forks v's threads
    By clancyPC in forum C Programming
    Replies: 7
    Last Post: 11-11-2005, 06:29 AM
  3. Replies: 1
    Last Post: 10-24-2005, 07:35 AM
  4. 5158 handles, 300 threads, and 23 processes
    By Invincible in forum A Brief History of Cprogramming.com
    Replies: 15
    Last Post: 06-06-2002, 05:24 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21