`

Difference between Thread and Process

阅读更多

What is the difference between a process and a thread?

 

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 space.
  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.

From: http://stackoverflow.com/questions/200469/what-is-the-difference-between-a-process-and-a-thread

分享到:
评论

相关推荐

    北京中科信软solaris培训

    Difference between a thread and an LWP Structures that describe the state of a kernel thread, an LWP, and a process How a mutex lock works Define a condition variable How a counting semaphore is ...

    C++ Multithreading Cookbook [DrLol].pdf

    The difference between foreground and background threads 243 Understanding the .NET synchronization essentials 247 Locking and avoiding deadlocks 254 Thread safety and types of the .NET framework 261 ...

    Mastering the C++17 .pdf

    The C++ language has a long history, dating back to the 1980s. Recently it has undergone a renaissance, ...class and function templates, the difference between lvalue and rvalue references, and so on.

    DotNet面试题

    1. Describe the difference between a Thread and a Process? 2. What is a Windows Service and how does its lifecycle differ from a "standard" EXE? 3. What is the maximum amount of memory any ...

    微软内部资料-SQL性能优化2

    A process can leak resources such as process memory, pool memory, user and GDI objects, handles, threads, and so on. Memory Concepts (X86 Address Space) Per Process Address Space Every process ...

    微软内部资料-SQL性能优化3

    An isolation level determines the degree to which data is isolated for use by one process and guarded against interference from other processes. Prior to SQL Server 7.0, REPEATABLE READ and ...

    BobBuilder_app

    Pages in a b+tree are usually implemented as a list or array of child pointers and so while finding and inserting a value is a O(log k) operation the process actually has to move children around in ...

    acpi控制笔记本风扇转速

    condition is known to exist between AcpiWalkNamespace and the Load/Unload ASL operators and is still under investigation. Restructured the AML ParseLoop function, breaking it into several ...

    Java邮件开发Fundamentals of the JavaMail API

    * Connections between the JavaMail API and the JavaBeans Activation Framework Objectives By the end of this module you will be able to: * Send and read mail using the JavaMail API * Deal with ...

    Springer.The.Developer’s.Guide.to.Debugging.2008.pdf

    6.1.10 The Difference Between Algorithm and Implementation . . 70 6.2 Using Profiling Tools . . . . . . . . . . . . 72 6.2.1 Do Not Write Your Own Profiler . . . . . . . 72 6.2.2 How Profilers Work . ...

    Google C++ Style Guide(Google C++编程规范)高清PDF

    Correct use of header files can make a huge difference to the readability, size and performance of your code. The following rules will guide you through the various pitfalls of using header files. ...

    Visual C++ 编程资源大全(英文源码 控件)

    05.zip Showing disabled combo text in black ComboBox的只读属性(5KB)<END><br>6,06.zip Combobox Color Picker 选择颜色的ComboBox(6KB)<END><br>7,07.zip Switch between drop down & drop list...

Global site tag (gtag.js) - Google Analytics