InterviewSolution
| 1. |
What Is The Difference Between Threads Vs Processes ? |
|
Answer» A THREAD is analogous to the operating system process in which your application RUNS. Just as processes run in parallel on a COMPUTER,threads run in parallel within a single process. Processes are fully isolated from each other; threads have just a limited degree of isolation. In particular, threads share (heap) MEMORY with other threads running in the same application. This, in part, is why threading is useful: one thread can fetch data in the background, for instance, while ANOTHER thread can display the data as it arrives. A thread is analogous to the operating system process in which your application runs. Just as processes run in parallel on a computer,threads run in parallel within a single process. Processes are fully isolated from each other; threads have just a limited degree of isolation. In particular, threads share (heap) memory with other threads running in the same application. This, in part, is why threading is useful: one thread can fetch data in the background, for instance, while another thread can display the data as it arrives. |
|