ALLInterview.com :: Home Page KalAajKal.com
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
info       Did you received any Funny E-Mails from your Friends and like to share with rest of our friends? Yeah!! you can post that stuff   HERE
Google
 
Categories  >>  Software  >>  Microsoft Related  >>  Dot Net  >>  Dot Net Framework
 
 


 

 
 Dot Net Framework interview questions  Dot Net Framework Interview Questions
 Dot Net Remoting interview questions  Dot Net Remoting Interview Questions
 Dot Net WindowsForms interview questions  Dot Net WindowsForms Interview Questions
 Dot Net General interview questions  Dot Net General Interview Questions
 Dot Net AllOther interview questions  Dot Net AllOther Interview Questions
Question
What is the difference between STA and MTA?
 Question Submitted By :: Swapna
I also faced this Question!!     Rank Answer Posted By  
 
  Re: What is the difference between STA and MTA?
Answer
# 1
Apartment Threading (STA): This allows multiple threads to 
exist in a single application. In single threading 
apartment (STA), each thread is isolated in it?s own 
apartment. The process may contain multiple threads 
(apartments) however when an object is created in a thread 
(i.e. apartment) it stays within that apartment. If any 
communication needs to occur between different threads 
(i.e. different apartments) then we must marshal the first 
thread object to the second thread.
 
Is This Answer Correct ?    6 Yes 3 No
Praveen
 
  Re: What is the difference between STA and MTA?
Answer
# 2
In single threaded apartment (STA) each thread is isolated 
in a separate apartment underneath the process. The process 
can have any number of apartments that share data through a 
proxy. The application defines when and for how long the 
thread in each apartment should execute. All requests are 
serialized through the Windows message queue such that only 
a single apartment is accessed at a time and thus only a 
single thread will be executing at any one time. STA is the 
threading model that most Visual Basic developers are 
familiar with because this is the threading model available 
to VB applications prior to VB.NET. You can think of it 
like an apartment building full of a row of one room 
apartments that are accessible one at a time through a 
single hallway. The advantage this provides over single 
threaded is that multiple commands can be issued at one 
time instead of just a single command, but the commands are 
still sequentially executed.


The free threaded/Multi Threaded Apartment (MTA) model has 
a single apartment created underneath the process rather 
than multiple apartments. This single apartment holds 
multiple threads rather than just a single thread. No 
message queue is required because all of the threads are a 
part of the same apartment and can share data without a 
proxy. You can think of it like a building with multiple 
rooms that are all accessible once you are inside the 
building. These applications typically execute faster than 
single threaded and STA because there is less system 
overhead and can be optimized to eliminate system idle 
time.
 
Is This Answer Correct ?    5 Yes 0 No
Prabhu
 
 
 

 
 
 
Other Dot Net Framework Interview Questions
 
  Question Asked @ Answers
 
IS MS.Net platform independent or dependent? Ksb10
What are the properties of Thread class?  1
More on CLR ? MMTS2
Features in .net framework 1.1 ? Digital-GlobalSoft1
About Assembly in .NET, types of assemblies, their difference, How to register into GAC. How to generate the strong names & its use ? MMTS2
How will you load dynamic assembly? How will create assemblies at run time? MGL2
WHICH IS THE BEST INSTITUTE FOR DOTNET REAL TIME PROJECT TRAINING Cap-Gemini17
If Controller is not there in MVC Pattern what happens?  1
please tell me the best book of asp.net in the markit. which explain in simple and detail.  2
What is serialization in .NET? What are the ways to control serialization?  2
what is MetadData?. What is CTS? Type of Join in SQL Server? What is diffrence between Primary Key and Unique Key? FutureSoft4
What are the contents of assembly?  2
Can source code be reverse-engineered from IL?  2
How do you register the dotnet component or assembly ? Accenture1
Where does web.config info stored? Will this be stored in the registry ? Accenture1
what is Thread Priority?  1
reading doc file in textbox using .net2005 with c#  3
js fn to go to the particular page when enter is clicked  1
Have you designed any components? HP1
Tell me the best web-sites for Learning the ASP DOT NET.  1
 
For more Dot Net Framework Interview Questions Click Here 
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us interview questions urls   External Links 
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com