Linux Threads
[ ] >Linux refers to them as tasks rather than threads
[ ] >Thread creation is done through clone() system call
[ ] >Clone() allows a child task to share the address space of the parent task (process)
Windows XP Threads
[ ]>Implements the one-to-one mapping
[ ]>Each thread contains
[ ]>A thread id
{}Register set
{}Separate user and kernel stacks
{}Private data storage area
[ ]>The register set, stacks, and private storage area are known as the context of the threads
[ ]>The primary data structures of a thread include:
{}ETHREAD (executive thread block)
{}KTHREAD (kernel thread block)
{}TEB (thread environment block)
Java Thread
- Java thread are managed by the JVM
- Java thread may created by:
> Extending thread class
> Implementing the Runnable inteface
- In Java, each thread is represented by an object of class java.lang.Thread, which handles the necessary bookkeeping and provides methods for controlling the thread

No comments:
Post a Comment