Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4075588
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T17:19:02+00:00 2026-05-20T17:19:02+00:00

I want to share some question in which i got confused. Please check. :-)

  • 0

I want to share some question in which i got confused. Please check. 🙂

How many GC threads do we have in a .NET process running on quad-core i7 Process?

I said 4×2=8?

Which GC generation utilize more memory and why?

I said Gen2 , but don’t know why? i guessed because it’s size is shown bigger in every book or net. 😛

Contravariance is the corollary of covariance? Explain.

Its from generics, but don’t know how to explain it.

EnlistDistributedTransaction method is not supported by which database?

i said Oracle and IBM DB?

Importance of codeBase Element in C# and where it is use?

I said Assembly, but don’t know the exact importance

Well , I managed to clear the interview, but these question really took me out. Please see if you can give me some advice on these question?

thanks
Ajitpal

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T17:19:03+00:00Added an answer on May 20, 2026 at 5:19 pm

    CoVariance/ContraVariance

    For CoVariance/ContraVariance they were perhaps thinking of the example of Arrays (or in general of R/W CoVariant objects)

    class A
    {
    }
    
    class B : A
    {
    }
    
    static void Func(A[] a) {
        a[0] = new A();
    }
    
    B[] b = new B[5];
    Func(b);
    

    This is “legal” to write, but it will throw on the assignment (in the Func) (ArrayTypeMismatchException). Here the CoVariant caused a problem. From the POV of Func it’s “strange”. I’ll say that ContraVariance is a “missing” corollary of ReadWrite CoVariance (it should be there, but clearly it’s impossible to do it)

    For the GC

    http://architecturebyashwani.blogspot.com/2010/02/foreground-gc-and-background-gc.html

    It SEEMS that Workstation GC always happens in the thread that allocates the memory, so there isn’t any “extra” thread for the GC. I’ll add that this is version-dependant, so it could change from version to version of .NET (and Mono does it differently).
    With Server GC you have specialized threads for GC, one for each processor. The I7 Quad Core of the example probably has HT (HyperThreading), so 8 “cores”, so 8 threads.

    Generation Size

    For the size of the generations… I would say that “normally” the Gen2 is larger, because large objects are always Gen2 ( http://msdn.microsoft.com/en-us/magazine/cc534993.aspx ) (technically they aren’t Gen2… They live in a separate space that is checked when Gen2 is checked, but we will ignore this… the question wasn’t very clear, and it is implementation-defined and opaque enough that we don’t know EXACTLY how the Gens are “LinkedListed” in memory), and long lived objects will go to Gen2 (so after the “startup” phase of your program, the singletons and other long-lived objects are all in Gen2)

    BUT … in general this isn’t true.

    Let’s say you make a program that does a single allocation (var obj = new object()). That allocation will start at Gen0. When that object is allocated, there is a single object, and that object is Gen0, so technically Gen0 is the biggest one.

    DTC

    IBM DB2 supports the DTC, and so Oracle:

    • http://msdn.microsoft.com/en-us/library/system.data.oracleclient.oracleconnection.enlistdistributedtransaction.aspx

    • http://publib.boulder.ibm.com/infocenter/db2luw/v9r7/index.jsp?topic=/com.ibm.swg.im.dbclient.adonet.ref.doc/doc/DB2ConnectionClassEnlistDistributedTransactionMethod.html

    It’s semi-tautological, but I would say that EnlistDistributedTransaction is not supported by

    • DB that don’t support transactions (some MySql, depending on the type of the base DB)
    • DB that don’t support a transaction monitor/transaction coordinator, but from what I’ve read, newer MySql, using base DB that support transactions, seems to be able to support DTC (for example read http://dev.mysql.com/doc/refman/5.0/en/xa.html )

    <codeBase> Element

    Written THIS way it’s much more clearer

    http://msdn.microsoft.com/en-us/library/efs781xb.aspx

    You can force your app to run with a particular version of a referenced assembly. Useful if there are “breaking changes” between versions of an assembly.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to share data between threads, and have it automatically deleted when the
We have an Yii-based PHP application which does some generic actions (like Share with
I want to have multiple objects share a reference through a private field, such
I have a some html being generated by JQuery on a Share Point page.
There are two different UserControls which share some common Properties. What I'd like to
I have a Java web application which stores some data in the session. The
I have an existing VS 2005 Std .NET Compact Framework application that I want
I have a class, which has a boost::asio::io_service object. I want this object stored
I asked this question several weeks ago and received some good answers: ASP.NET Class
I am working on game engine prototype and have the following question: Right now

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.