.NET
The cross-platform .NET runtime under C# services: the CLR and JIT, garbage collection, the thread pool, core library services and hosting. Interviewers check what runs below the framework.
on this pageshowhide
explore
- IL, JIT and AOT6 questions
- Managed Heap & GC Modes6 questions
- BCL & Core Libraries6 questions
- Thread Pool & Parallelism6 questions
- Worker & Console Hosts6 questions
- Benchmarks and Tracing6 questions
questions
page 2 of 2As lead of a .NET 10 platform team, would you move a command-line deployment tool and a long-running pricing service to Native AOT, ReadyToRun or plain JIT, and why?
basics
~20 sDecide per workload: the short-lived deployment tool suits Native AOT if its dependencies are AOT-clean, else ReadyToRun; the pricing service usually stays on the JIT, with ReadyToRun for cold starts, since tiered JIT with dynamic PGO usually wins at steady state.
As a lead, which GC settings would you standardise for a fleet of .NET 10 services in memory-limited containers, and how would you decide them?
basics
~20 sWrite one explicit baseline in a shared Directory.Build.props: GC flavor, DATAS, heap hard limit percent and any memory-conservation level, chosen per service class from load tests, with GC signals on every dashboard and evidence for each exception.
As the lead of a .NET team, what evidence would you require before a performance change merges, and how would you keep that rule cheap enough to follow?
basics
~20 sRequire a BenchmarkDotNet comparison with the old code as baseline and [MemoryDiagnoser], run in Release on a quiet machine, plus a before-and-after production signal from counters or a trace, and scale that bar to how risky the change is.
In a .NET TPL Dataflow log pipeline of TransformBlock, BatchBlock and ActionBlock, why does memory grow without limit, and why does awaiting the last block's Completion hang?
basics
~20 sDataflow blocks buffer without limit by default, so a fast parser fills memory ahead of a slow writer; set BoundedCapacity and feed with SendAsync. The hang comes from LinkTo without PropagateCompletion, or from a head block nobody calls Complete() on.
In .NET, what does [LibraryImport] generate at compile time that [DllImport] leaves to the runtime, and what must a project change to switch?
basics
~20 s[DllImport] has the runtime build and JIT-compile an IL marshalling stub at run time. [LibraryImport] (.NET 7) has a source generator emit that marshalling as C# at build time; methods become static partial and the project needs AllowUnsafeBlocks.
A .NET 10 worker runs as a systemd unit with Type=notify; what does AddSystemd change, and what goes wrong if the call is missing?
basics
~20 sAddSystemd swaps in SystemdLifetime, which sends READY=1 over systemd's NOTIFY_SOCKET once the host has started and STOPPING=1 when it stops, and switches console logs to the systemd formatter. Without it a Type=notify unit never hears READY=1 and its start times out.
showing 31–36 of 36