Stack multiple threads share the same process conditions

Thread owns are not shared, which comprises: a stack, registers, status, program counter

There are shared among threads: the heap, global variables, static variables;

Process possession of resources: the address space, global variables, open files, child processes, semaphores, account information.

 

Thread shared content comprising:

    a process code segment
    process data segment
    Process open file descriptors,
    the processor signal,
    the current directory and the process of
    the process user ID and group ID of the process     

      threads unique to content comprising:

    a thread ID
    value of the register set
    of threads stack
    error return code
    signal mask thread 

Guess you like

Origin www.cnblogs.com/senior-engineer/p/10963119.html