Ten interesting questions about. Net Clr and GC POPQUIZ

Source: Internet
Author: User

Recently, I have studied Clr and GC. On the msdn blog, I saw a female technician from the ms clr testing team raise more than a dozen questions. I think the questions are quite interesting and difficult, then modify it, delete a few and add a few more, and solicit a wide range of answers ^_^

 

1. if a managed process runs on a dual-core CPU machine, GC runs in server GC mode. If the CPU does not have the hyper thread function, how many GC threads does the managed process have? Can I use a debugging tool to prove your judgment?

2. On a multi-core server, if you run a winform app program, this program has high requirements for real-time response. Which GC mode should you use? Why? (You can select server GC, workstation GC, concurrent-workstation)

3. Under what conditions or operations will a garbage collection be performed?

4. What makes an object move from generation 0 to Gen 1, or from Gen 1 to Gen 2? What about pinned objects?

5. If one machine is a quad-core CPU, how many GC heaps are there when the GC in server mode and the GC in workstation mode are run?

6. In DOTNET Framework 2.0, if mscorwks. dll is loaded in a process, can this thread be determined to be running under the GC of workstation mode?

7. Can I manually change the GC running mode of a process? Under what circumstances should I modify it?

8. Why should I close the connection when I open a database connection? Will GC not handle these tasks for us?

9. What are the differences between strong references, weak reference, and pinned reference?

10. In large object heap, are all large objects stacked together in a filtering order?

There is no real standard answer, and the answer is justified.

If most of the problems are small cases for you, please let me know about your MSN. I have a large ticket puzzling question queue .....

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.