Friday, February 15, 2013

Describe the difference between a Thread and a Process? Write an example to create both. (C#)

Threads vs Processes

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 great tutorial on threads and its implementations is :
http://www.albahari.com/threading/

No comments: