:: Home Page            
 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                      
Categories >> Software >> Microsoft Related >> Dot Net >> Dot Net Framework


 Dot Net Framework interview questions  Dot Net Framework Interview Questions (204)
 Dot Net Remoting interview questions  Dot Net Remoting Interview Questions (75)
 Dot Net WindowsForms interview questions  Dot Net WindowsForms Interview Questions (83)
 Dot Net General interview questions  Dot Net General Interview Questions (321)
 Dot Net AllOther interview questions  Dot Net AllOther Interview Questions (178)
What is the difference between STA and MTA?
 Question Submitted By :: Dot-Net-Framework
I also faced this Question!!     Answer Posted By  
# 1
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
Is This Answer Correct ?    29 Yes 1 No
# 2
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 ?    13 Yes 7 No
# 3

1.STA stands for Single Threaded Apartment
2.In STA,there may be multiple apartment.But only single
thread can be executed in a apartment.
3.In STA, if there is a need to communicate between threads
we need a proxy, they can not do it directly.
4.MTA applications execute slower than STA
5.If the COM object cannot handle its own synchronization
i.e not thread safe then the STA model can be used


1.MTA stands for Multi Threaded Apartment
2.In MTA, only one apartment will be there and all threads
will execute within that single apartment.
3.In MTA, threads communicate directly to each other without
a proxy.
4.MTA applications typically execute faster than STA because
there is less system overhead and can be optimized to
eliminate system idle time.
5.If the COM object can handle its own synchronization then
the MTA model can be used
Is This Answer Correct ?    1 Yes 3 No

Other Dot Net Framework Interview Questions
  Question Asked @ Answers
Difference between manifest , metadata? TCS 3
IS MS.Net platform independent or dependent? Ksb 19
about triggers? CSC 6
I am confusing about reflection.can any one tell about REFLECTION with example? TCS 1
what are abstract classes? what is overriding?   12
How do you register the dotnet component or assembly ? Accenture 1
Hello frnds, Actually i am plannig to put fake Xperince letter is it good or not, and please suggest me from where we take it.   1
What is the common property in .net? Nth-Solution 1
What does assemblyinfo.cs file consists of ? Accenture 1
what is the use of final method TCS 3
What is Reflection in .NET? Fiserv 6
can we change the page layout in ASP.NET 2.0 as grid layout like in the previous version? TCS 1
For more Dot Net Framework Interview Questions Click Here 

Copyright Policy  |  Terms of Service  |  Articles  |  Site Map  |  RSS Site Map  |  Contact Us
Copyright 2013  All Rights Reserved.   ::