asp.net 2+ interview questions

Monday 16 May 2011

1 What is the difference between a Thread and Process?

A process is a collection of virtual memory space, code, data, and system resources. A thread is code that is to be serially executed within a process. A processor executes threads, not processes, so each application has at least one process, and a process always has at least one thread of execution, known as the primary thread. A process can have multiple threads in addition to the primary thread. Prior to the introduction of multiple threads of execution, applications were all designed to run on a single thread of execution.

When a thread begins to execute, it continues until it is killed or until it is interrupted by a thread with higher priority (by a user action or the kernel’s thread scheduler). Each thread can run separate sections of code, or multiple threads can execute the same section of code. Threads executing the same block of code maintain separate stacks. Each thread in a process shares that process’s global variables and resources.

2 Differance bettween Exe and DLL?

 EXE files are self executable files which can be directly run by the CPU. When we build our application it creates a .exe file.

DLL is otherwise known as class libraries. These are nothing but some class defined to do a particular job and we can use these DLLs in our application for our convenience.

0 comments:

Post a Comment