45,000 Jobs - Get an Interview Call,  Post Your Resume Here
SURESHKUMAR.NET FORUMS
Registered Member Login:
Not a member? Register today!



Welcome to the SURESHKUMAR.NET FORUMS.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.




vb / asp.net Interview / Technical Questions Kindly solve an many as questions you can. It will sharpen your skills and those solutions will help others too.

Describe the difference between a Thread and a Process?

        

Reply
 
LinkBack Thread Tools Display Modes
Old 29-01-07, 07:05 PM   #1 (permalink)
Moderator
 
kiran2710's Avatar
 
Join Date: Jul 2006
Posts: 2,191
Thanks: 5
Thanked 505 Times in 324 Posts
Rep Power: 73 kiran2710 has a reputation beyond repute kiran2710 has a reputation beyond repute kiran2710 has a reputation beyond repute kiran2710 has a reputation beyond repute kiran2710 has a reputation beyond repute kiran2710 has a reputation beyond repute kiran2710 has a reputation beyond repute kiran2710 has a reputation beyond repute kiran2710 has a reputation beyond repute kiran2710 has a reputation beyond repute kiran2710 has a reputation beyond repute
Describe the difference between a Thread and a Process?

Describe the difference between a Thread and a Process?

__________________



Kiran







kiran2710 is offline Offline   Reply With Quote
Old 05-03-09, 12:09 PM   #2 (permalink)
Junior Member
 
Join Date: Mar 2009
Age: 29
Posts: 9
Thanks: 0
Thanked 2 Times in 2 Posts
Rep Power: 1 navyseals is on a distinguished road
Wink Re: Describe the difference between a Thread and a Process?

A process is a collection of virtual memory space, code, data, and system resources. A thread is code that is to be serially executed within a process. A processor executes threads, not processes, so each application has at least one process, and a process always has at least one thread of execution, known as the primary thread. A process can have multiple threads in addition to the primary thread
Thread – is stream of executable code within process. They are light weight process.
All thread with in a process share process instruction,code & data segment,open file descriptor,signal handler,userID and GroupID. Thread has its own set of register including program counter,stack pointer
The major difference between threads and processes is
1.Threads(Light weight Processes) share the address space of the process that created it; processes have their own address.2.Threads have direct access to the data segment of its process; processes have their own copy of the data segment of the parent process. 3.Threads can directly communicate with other threads of its process; processes must use interprocess communication to communicate with sibling processes. 4.Threads have almost no overhead; processes have considerable overhead.5.New threads are easily created; new processes require duplication of the parent process.6.Threads can exercise considerable control over threads of the same process; processes can only exercise control over child processes. 7.Changes to the main thread (cancellation, priority change, etc.) may affect the behavior of the other threads of the process; changes to the parent process does not affect child processes.If we consider running a word processing program to be a process, then the auto-save and spell check features that occur in the background are different threads of that process which are all operating on the same data set (your document).
navyseals is offline Offline   Reply With Quote
Reply

Tags
difference , process , thread


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Need .Net Interview Questions vidyasagarkumar VB / ASP.NET Technologies 6 06-09-07 12:37 AM
thread - join() anitha.s JAVA Technologies 2 29-01-07 11:42 AM
J2EE - What is difference between runnable and thread ? why we use static class preethisingh Java Interview / Technical Questions 0 23-01-07 02:38 PM
J2EE - What are the various ways of creating a thread. What is difference between them? preethisingh Java Interview / Technical Questions 0 23-01-07 02:21 PM
java JSP naga JAVA Technologies 4 21-08-06 04:03 PM


All times are GMT +6.5. The time now is 12:29 PM.

More Interview Questions Here...

Content Relevant URLs by vBSEO 3.3.0