Results 1 to 6 of 6

Thread: Differentiation between Process and thread

  1. #1
    Join Date
    May 2008
    Posts
    2,389

    Differentiation between Process and thread

    Hello friends,

    I am beginner in the programming field. I have too much confusion between the process and thread. For me both thread and process comprises same meaning. I am not able to get difference between process and thread. If you knows about the process and thread very well, then please share you knowledge with me. So that it will be easy for me to understand the differentiation process and thread. I would greatly appreciate your help.

  2. #2
    Join Date
    Feb 2008
    Posts
    1,852

    Re: Differentiation between Process and thread

    Hi,

    Process comprises its own address space and which means that it can't access variables or data structures belonging to a different process Threads are able to make communication with other threads of its process; process uses inter process communication for to make communication with sibling processes. Threads share the same stack and same memory space. Thread is light weight process while process is an thread under execution.Thread is a part of process while each process runs one default (main) thread. New threads are easily created; new processes require duplication of the parent process.

  3. #3
    Join Date
    Jan 2008
    Posts
    1,521

    Re: Differentiation between Process and thread

    A process has its own memory space, its own stack that does not share with others. Processes can only exercise control over child processes. Threads do not share the same cell, they share the same resources, the same open files, the same global variables. By cons each thread has its own stack. Threads have almost no overhead; processes have considerable overhead. A process is a collection of virtual memory space, code, data, and system resources.

  4. #4
    Join Date
    Apr 2008
    Posts
    1,948

    Re: Differentiation between Process and thread

    Threads unlike Share-net the same process address space, a process can contain multiple threads (at least 1) but a thread belongs to a single process. There is also a difference next synchronization for threads it should use critical sections, when a sync process between using semaphores. A process can have multiple threads and process runs in a thread. Threads can exercise considerable control over threads of the same process while the processes can only exercise control over child processes.

  5. #5
    Join Date
    May 2008
    Posts
    2,012

    Re: Differentiation between Process and thread

    Hi friend,

    A process has an execution stack (storage function calls with their variables ), a data segment (global and static variables) and a segment of code (machine instructions ). For an operating system, it is faster to switch from one thread to another. It is easier to run many threads at once that many processes at once. So when you create a thread, only the stack is "copied". Single thread allows a operating systems for to perform single task at a time similarities between process and threads.

  6. #6
    Join Date
    Apr 2008
    Posts
    2,005

    Re: Differentiation between Process and thread

    Hi, Following are some advantages as well as the disadvantages of 'Threads':
    Advantages:
    * CPU (overhead) reduced
    * Reduced memory consumption

    Disadvantages:
    * Much more difficult to debug
    * More difficult to develop

Similar Threads

  1. Replies: 7
    Last Post: 29-02-2012, 10:19 PM
  2. Replies: 3
    Last Post: 28-02-2012, 08:35 PM
  3. Synchronize a producer thread and a consumer thread in C#
    By Ayuka in forum Software Development
    Replies: 6
    Last Post: 10-11-2010, 04:04 AM
  4. Thread vs Process
    By ramsun in forum Software Development
    Replies: 5
    Last Post: 23-02-2010, 08:05 PM
  5. Replies: 1
    Last Post: 26-03-2009, 06:31 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,751,240,961.97390 seconds with 16 queries