Arnie Morton's in LA for Dinner

Went out to dinner tonight with some guys from the conference. One looked like the brother from Everybody Loves Raymond, one guy looked like the guy from the future in the Terminator. All nice guys though... thanks again for inviting me out.

So we went to Arnie Morton's for dinner. Our hostess was a hot little number wearing a sleeveless black top, black pants and black boots. Her discreet little nose piercing was only icing on the cake. Her Mudd branded pants had me thinking that she was a mud wrestler... oh, if it were only so - I'd be like the fat guy in Stripes (except not fat :).

Anyway, I had the Lobster Bisque and Lobster with Filet Mignon cooked just right (ie. with a little blood). After a little full bodied wine... I was done. Cost: $121. Food was good.

What made the trip worthwhile though... was seeing the tattoo of the twin dolphins that were playfully skipping out of the water on the hostess' lower back. She was very proud of it when she bent over and hiked up her shirt to show me. I have to say her skin was smooth as silk (Mmmm). It wasn't till I was leaving that I realized that I should have found out what time she was getting off work (I mean what else is that King size bed for in my room?). Sometimes I can be a little slow... then again maybe it was the DayQuil mixed with Wine (a strong full-bodied red). Yeah, that must be it. You guys believe me right?

Tags: []

Garbage Collection @ 151/152

Funny thing just happened. I nearly walked right into Don Box. Stupid little thing really... happens every day. You're heading into the bathroom, Don Box is heading out, you nearly collide. He mutters a simple apology. You stand there thinking: "Cool. That was Don Box, author of Miguel - the musical."

So anyway, this session is brought to you by Maoni Stephens (another woman! yeah! go geek girls!).

Basics: New heap begins with New generation, accessible references keep objects alive, then we compact referenced objects, objects left over are then promoted to older generation

Generations: Three generations (gen0, gen1, gen2) of segments. Most objects die in gen0, but if the object survives it is promoted up the chain to gen1 (in-flight data) and then gen2 (long lived data). gen0 and gen1 are called the ephemeral generations.

GC Heap Segments: GC uses VirtualAlloc to acquire and expire memory (usually in 60MB segments). If it fails to acquire a new segment it throws an OutOfMemoryException. Additional segments reserved, committed, decomitted or deleted as necessary. VM Hoarding (STARTUP_HOARD_GC_VM) startup flag allows you to reuse segments (?) thereby avoiding fragmentation.

Allocation: Costs of allocation (Cheap lock on UP; lock free on MP, moving a pointer forward, clearing memory). Managed allocation (objects that are instantiated together, stay together). Always ask for the exact number of bytes that you need.

Collection: GC kicks in way before the memory gets low... based on the limit for gen0. Whenever your alloc exceeds this limit (a few 100k to a full 60MB segment) the GC kicks in. GC kicks in when 1) there is not enough space in gen0, 2) explicitly calling System.GC.Collect(). It is not recommended to call GC.Collect() because it interfere with the normal operation of the GC. How does the GC kick in: first managed threads are suspended, then the GC runs (marks/compacts), and finally managed threads are resumed. Anything on the stack, handle table, any statics, older generation(s), or in the finalizer queue are marked, compacted and/or aged when the GC runs.

Large Object Heap (LOH): Objects 85KB or larger are only sweeped into the freelist (LOH segments). Collection happens during gen2 GCs.

Collection Cost: Performance counter "% time in GC" can be exposed for tuning. You want this % to be low... larger %'s indicate that items are staying around in the GC too long. gen2 GC's take much longer than gen0 or gen1 GCs (which are relatively cheap). gen2 GC's only occur if the gen2 gets too big. LOH has a different cost model (should reuse LOHs if possible).

Different Flavors of GC: Concurrent GC (workstation) was designed for interative apps and is on by default. Trade some CPU/memory for shorter pause time. Concurrent GCs are only for gen2's and can be turned off via hosting or config. Server GC was designed for apps that have a consistent number of allocations for each request and require high scalibility and throughput. Once Server GC thread is created per CPU running at the highest priority. You must turn on the Server GC in the app.config or machine.config. ASP.NET and SQLCLR can use the Server GC. CLR1.1 (mscorsvr.dll), CLR 2.0 (mscorwks.dll).

Pinning: Most significant change in 2.0 GC. Pinning allowed interop with unmanaged code. Objects get pinned by using the GChandle of type GCHandleType.Pinned, if allowed by language syntax, or if args get pinned by the interop frame. Pinning did cause fragmentation, so GC team moved the gen0 start after the lasted pinned objects

Tags: []

Avalon @ 501ABC

This is a real session. I remember XAML from PDC2003. It doesn't look like they've come very far. In fact, the language is still in flux. At what point our man says that some of the verbosity (and namespace clashes) will go away when they hit a release. I mean, sure they've got it bootstrapped in Orcas (VS.Next) even with codebehinds hookups - but sheesh, there are third parties that are farther along with Microsoft's technology then they are!

Anway, if you want to host a XAML form in a WinForms app apparently all you do is cut off the <Window> root tag. Instead you want to leave your <grid> tag as your root tag. Now in your WinForm have your Window class inherit from Grid. Finally, you tweak the project file to import the WinFX.targets (this requirement, we're told, will most likely be removed from the final product). This is how we will begin to use XAML -> XAML under WinForms.

So to recap - the coolest new technology announced at PDC 2003 is still: a) not finished, b) not shipping in 2005. In fact XAML won't ship until the second half of 2006 with Orcas (VS.Next - the one that will come with the Expression design surface) and Windows Vista (as a part of the Windows Presentation Foundation - aka Avalon). Crap.

Tags: []

My Schedule for Friday 9/16

The last day of the PDC has arrived. I'm getting sicker by the minute (although I just gobbled two more DayQuil liquigels), and I'm already late. So here is my schedule (if I can make it):

TimeSessionLocation
10:30-12:00Agile Development409AB
12:00-12:05Take Out Lunch 
12:05-12:45VPC Tips and Tricks152/153
1:00-2:15Garbage Collection150/151

I'm wearing black shoes, black jeans, my black longhorn shirt, all covered by that same large red microsoft long-sleeve sweatshirt that's been keeping me warm the last few chilly days. I will still be tripping on DayQuil - only this time I'll look dehydrated (flem production facilities were on overdrive last night), tired (several hootin/hollerin yahoos kept honkin their horns all night long - not too mention the occasional cops helicopter) and sad (its the last day of developer bliss after all).

Tags: []

«September»
SunMonTueWedThuFriSat
28293031123
45678910
11121314151617
18192021222324
2526272829301
2345678