:: Home Page            
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
Categories >> Software >> Operating Systems >> Operating Systems General Concepts


 Windows interview questions  Windows Interview Questions (339)
 Linux interview questions  Linux Interview Questions (451)
 Unix interview questions  Unix Interview Questions (455)
 Solaris interview questions  Solaris Interview Questions (781)
 RTOS interview questions  RTOS Interview Questions (43)
 Bulnex interview questions  Bulnex Interview Questions (4)
 Operating Systems General Concepts interview questions  Operating Systems General Concepts Interview Questions (261)
 Data Structures interview questions  Data Structures Interview Questions (67)
 Operating Systems AllOther interview questions  Operating Systems AllOther Interview Questions (48)
What is Difference between thread and process?
 Question Submitted By :: Operating-Systems-General-Concepts
I also faced this Question!!     Answer Posted By  
# 1
The major difference between threads and processes is
1.Threads 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.
Is This Answer Correct ?    911 Yes 67 No
# 2
Process is a program in execution where as thread is a
seperate path of execution in a program.
Is This Answer Correct ?    328 Yes 94 No
# 3
process is a execution of a program and program contain set
of instructions but thread is a single sequence stream
within the process.thread is sometime called lightweight
process. single thread alows a os to perform singler task
ata time similarities between process and threads are:
1)share cpu.
2)sequential execution
3)create child
4)if one thread is blocked then the next will be start to
run like process.
1)threads are not independent like process.
2)all threads can access every address in the task unlike
3)threads are design to assist onr another and process
might or not might be assisted on one another.
Is This Answer Correct ?    145 Yes 51 No
# 4
A Thread is a smallest execution unit of the Process.
While a process can have multiple threads.
Is This Answer Correct ?    84 Yes 38 No
Purushottam Kumar
# 5
Technically, a thread is defined as an independent stream
of instructions that can be scheduled to run as such by the
operating system.
So, in summary, in the UNIX environment a thread:
o Exists within a process and uses the process
o Has its own independent flow of control as long as
its parent process exists and the OS supports it
o Duplicates only the essential resources it needs to
be independently schedulable
o May share the process resources with other threads
that act equally independently (and dependently)
o Dies if the parent process dies - or something
o Is "lightweight" because most of the overhead has
already been accomplished through the creation of its

Whereas in case of process, every process has its own
memory management, two process cannot communicate without
using IPCS or Sockets, they do not share resources and
every process has its own process ID(pid).
Is This Answer Correct ?    57 Yes 35 No
Ankit Tripathi
# 6
process is a program in execution whereas thread is a light
wight process and has separate path.
Is This Answer Correct ?    45 Yes 35 No
G.siva Ganesh,thondangi
# 7
Process is nothing but a program in execution.where as
thread is a part of a process
Is This Answer Correct ?    18 Yes 8 No
Samantha Jyesta
# 8
Both threads and processes are methods of parallelizing
an application. However, processes are independent execution
units that contain their own state information, use their
own address spaces, and only interact with each other via
interprocess communication mechanisms (generally managed by
the operating system). Applications are typically divided
into processes during the design phase, and a master process
explicitly spawns sub-processes when it makes sense to
logically separate significant application functionality.
Processes, in other words, are an architectural construct.

By contrast, a thread is a coding construct that doesn't
affect the architecture of an application. A single process
might contains multiple threads; all threads within a
process share the same state and same memory space, and can
communicate with each other directly, because they share the
same variables.

Threads typically are spawned for a short-term benefit
that is usually visualized as a serial task, but which
doesn't have to be performed in a linear manner (such as
performing a complex mathematical computation using
parallelism, or initializing a large matrix), and then are
absorbed when no longer required. The scope of a thread is
within a specific code module—which is why we can bolt-on
threading without affecting the broader application.

Is This Answer Correct ?    9 Yes 1 No
# 9
Process is a memory block of an application instance.
Thread is a memory block of a process instance.
Is This Answer Correct ?    5 Yes 1 No
# 10
process enable user to open and work sevral application at
same time,thread enables an application to perform more then
one task at a time.
Is This Answer Correct ?    5 Yes 1 No
Rasika Bhimate

Other Operating Systems General Concepts Interview Questions
  Question Asked @ Answers
main() { charstr1="prakash"; charstr2="raju"; Str1=str2; printf("\n%d",str1); } IBM 7
Explain the concept of Reentrancy? ADP 1
Difference between Primary storage and secondary storage?   1
What are demand- and pre-paging?   4
What are turnaround time and response time? TCS 4
What is a compiler?   7
What are short, longand mediumterm scheduling? TCS 2
Difference between Primary storage and secondary storage?   3
What is difference between synchronous and asynchronous threads and when can we use them? HP 2
What is the Difference Between SystemCalls & Interpreter Satyam 1
What is page cannibalizing? Wipro 1
wat is virtual memory? how we can increase or decrease the virtual memory? IBM 5
For more Operating Systems General Concepts Interview Questions Click Here 

Copyright Policy  |  Terms of Service  |  Articles  |  Site Map  |  RSS Site Map  |  Contact Us
Copyright © 2013  All Rights Reserved.   ::