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 .....