- Process can be referred as a program in execution whereas thread is a part of process
- Process has its own address space whereas thread shares the same address space
- Process can have multiple threads. But thread is the small unit which can be executed concurrently in different threads
- Process are heavy weight and Thread are light weight
- Process does not depend on each other. Thread is independent to each other
- Communication between two processes is expensive and limited. Communication between two threads is less expensive as compared to process.
- Context switching from one process to another process is expensive. Context switching from one thread to another thread is less expensive as compared to process.
- A process has its own address space, global variables, signal handlers, open files, child processes, accounting information. A thread has its own register, state, stack, program counter.
- Process-based multitasking is not under the control of Java. Thread-based multitasking is under the control of Java.
No comments:
Post a Comment