CodeCamp 2007, Sunday 10.45 AM, 1.15PM

CodeCamp 2007, Sunday 10.45AM, 1.15PM

Chris Mullins [info] presented:

Concurrency and threading with .NET [description]

Yeah I know about threading. What I didn’t know is little .NET tricks and tips related to threading.

Covered: available heap space on x86 systems, thread memory consumption, CLR-managed threads: ThreadPool pros and cons, Async I/O (see FileStream.BeginRead for sample code) pros and cons, timers, RegisterWaitForSingleObject, thread abuse (I wonder… ‘expanding down the WCF’ anyone?)

Did you know that .NET thread inside of lock() block is automatically promoted to ‘Above average’ priority by CLR?

Tips: When you create a thread, give the name to it. Makes life easier.

Tool: WinDbg and Son of Strike

Worth working with? Sure. As a matter of fact, I am going to invite him to ESRI (if my mgr approves) to give full versions of his presentations.

ALSO, VERY NEXT SESSION:

Chris Mullins [see above for info] presented:
.NET Garbage Collection [see above for descriptions]

Covered: generational garbage collection, Server CLR, Workstation CLR, Concurrent and NonConcurrent CLR modes.

Also covered: weak root references (useful for caching)

Useful info: Richter’s Garbage Collection column in MSDN

Also covered: abuse of GC.Collect() and memory fragmentation problem. CLR performance counters related to GC. Profiling memory leaks. Abuse of Finalizers.

Tool: Scitech Memory Profiler (the best)
Tool: Red-Gate Memory Profiler (expensive)
Tool: VSTS Memory Profiler (expensive, lousy, sometimes is good)
Tool: CLR Profiler from MS (free, you get what you pay for)
Tool: WinDbg, Son of Strike (use only as last resort)

Did you know that registering event handler actually creates a reference? Statics of that class and event handler itself are not deleted unless you do this in Dispose(). NOTE: Check for details

NOTE: COM and Win32 calls pin memory and create memory fragmentation.

Book: Jeff Richter “CLR via C#” and his other book. Also, check blogs of MS-ers on GC topics.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Spam Protection by WP-SpamFree